// Fix translations in BO for tpl folders with underscore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10324 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
4abe8efd75
commit
eb5cea2726
1 file changed
+5
@@ -1481,6 +1481,9 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$class = strtolower($class);
|
$class = strtolower($class);
|
||||||
|
// For traductions in a tpl folder with an underscore
|
||||||
|
$class = str_replace('_', '', $class);
|
||||||
|
|
||||||
// if the class is extended by a module, use modules/[module_name]/xx.php lang file
|
// if the class is extended by a module, use modules/[module_name]/xx.php lang file
|
||||||
//$currentClass = get_class($this);
|
//$currentClass = get_class($this);
|
||||||
if (false && Module::getModuleNameFromClass($class))
|
if (false && Module::getModuleNameFromClass($class))
|
||||||
@@ -1489,11 +1492,13 @@ class AdminControllerCore extends Controller
|
|||||||
return Module::findTranslation(Module::$classInModule[$class], $string, $class);
|
return Module::findTranslation(Module::$classInModule[$class], $string, $class);
|
||||||
}
|
}
|
||||||
global $_LANGADM;
|
global $_LANGADM;
|
||||||
|
|
||||||
if (is_array($_LANGADM))
|
if (is_array($_LANGADM))
|
||||||
$_LANGADM = array_change_key_case($_LANGADM);
|
$_LANGADM = array_change_key_case($_LANGADM);
|
||||||
else
|
else
|
||||||
$_LANGADM = array();
|
$_LANGADM = array();
|
||||||
$key = md5(str_replace('\'', '\\\'', $string));
|
$key = md5(str_replace('\'', '\\\'', $string));
|
||||||
|
|
||||||
// retrocomp :
|
// retrocomp :
|
||||||
// if value is not set, try with "AdminTab" as prefix.
|
// if value is not set, try with "AdminTab" as prefix.
|
||||||
// @todo : change AdminTab to Helper
|
// @todo : change AdminTab to Helper
|
||||||
|
|||||||
Reference in new issue
Block a user