Files
edubox-prestashop/edubox-install-language.patch

31 lines
1.6 KiB
Diff

--- a/src/PrestaShopBundle/Install/Install.php 2026-06-20 18:07:13.506985399 +0000
+++ b/src/PrestaShopBundle/Install/Install.php 2026-06-20 18:07:22.294363061 +0000
@@ -622,17 +622,20 @@
'locale' => (string) $xml->locale,
];
- if (file_exists(_PS_TRANSLATIONS_DIR_ . (string) $iso . '.gzip') == false) {
- $language = EntityLanguage::downloadLanguagePack($iso, _PS_INSTALL_VERSION_);
+ // EduBox: skip legacy language pack download if Symfony pack is bundled
+ $errors = [];
+ $locale = $params_lang['locale'];
+
+ if (!EntityLanguage::translationPackIsInCache($locale)) {
+ if (file_exists(_PS_TRANSLATIONS_DIR_ . (string) $iso . '.gzip') == false) {
+ $language = EntityLanguage::downloadLanguagePack($iso, _PS_INSTALL_VERSION_);
- if ($language == false) {
- throw new PrestashopInstallerException($this->translator->trans('Cannot download language pack "%iso%"', ['%iso%' => $iso], 'Install'));
+ if ($language == false) {
+ throw new PrestashopInstallerException($this->translator->trans('Cannot download language pack "%iso%"', ['%iso%' => $iso], 'Install'));
+ }
}
}
- $errors = [];
- $locale = $params_lang['locale'];
-
/* @todo check if a newer pack is available */
if (!EntityLanguage::translationPackIsInCache($locale)) {
EntityLanguage::downloadXLFLanguagePack($locale, $errors);