[-] CORE : fixed bug #PSCFV-5514 - Override of module language file type fr.php in theme
This commit is contained in:
@@ -127,6 +127,7 @@ class TranslateCore
|
|||||||
static $translations_merged = array();
|
static $translations_merged = array();
|
||||||
|
|
||||||
$name = $module instanceof Module ? $module->name : $module;
|
$name = $module instanceof Module ? $module->name : $module;
|
||||||
|
|
||||||
if (!isset($translations_merged[$name]))
|
if (!isset($translations_merged[$name]))
|
||||||
{
|
{
|
||||||
$filesByPriority = array(
|
$filesByPriority = array(
|
||||||
@@ -138,16 +139,14 @@ class TranslateCore
|
|||||||
// PrestaShop 1.4 translations
|
// PrestaShop 1.4 translations
|
||||||
_PS_MODULE_DIR_.$name.'/'.Context::getContext()->language->iso_code.'.php'
|
_PS_MODULE_DIR_.$name.'/'.Context::getContext()->language->iso_code.'.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($filesByPriority as $file)
|
foreach ($filesByPriority as $file)
|
||||||
if (Tools::file_exists_cache($file))
|
if (Tools::file_exists_cache($file))
|
||||||
{
|
{
|
||||||
include_once($file);
|
include_once($file);
|
||||||
$_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE;
|
$_MODULES = !empty($_MODULES) ? $_MODULES + $_MODULE : $_MODULE; //we use "+" instead of array_merge() because array merge erase existing values.
|
||||||
$translations_merged[$name] = true;
|
$translations_merged[$name] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$key = md5(str_replace('\'', '\\\'', $string));
|
$key = md5(str_replace('\'', '\\\'', $string));
|
||||||
|
|
||||||
$cache_key = $name.'|'.$string.'|'.$source;
|
$cache_key = $name.'|'.$string.'|'.$source;
|
||||||
|
|||||||
Reference in New Issue
Block a user