// 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
+8
-3
@@ -855,7 +855,7 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
|
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||||
|
|
||||||
// todo : return value ?
|
// todo : return value ?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1473,7 +1473,7 @@ class AdminControllerCore extends Controller
|
|||||||
{
|
{
|
||||||
$iso = Context::getContext()->language->iso_code;
|
$iso = Context::getContext()->language->iso_code;
|
||||||
include_once(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
|
include_once(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
|
||||||
|
|
||||||
if (isset($_LANGADM))
|
if (isset($_LANGADM))
|
||||||
$_LANGADM = array_change_key_case($_LANGADM);
|
$_LANGADM = array_change_key_case($_LANGADM);
|
||||||
else
|
else
|
||||||
@@ -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,12 +1492,14 @@ 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
|
||||||
if ( isset($_LANGADM[$class.$key]))
|
if ( isset($_LANGADM[$class.$key]))
|
||||||
|
|||||||
Reference in new issue
Block a user