[-] BO: improvement of load time
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13986 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -49,7 +49,7 @@ class TranslateCore
|
|||||||
if (!isset($modules_tabs))
|
if (!isset($modules_tabs))
|
||||||
$modules_tabs = Tab::getModuleTabList();
|
$modules_tabs = Tab::getModuleTabList();
|
||||||
|
|
||||||
if (!is_array($_LANGADM))
|
if ($_LANGADM == null)
|
||||||
{
|
{
|
||||||
$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');
|
||||||
@@ -141,7 +141,7 @@ class TranslateCore
|
|||||||
$cache_key = $name.'|'.$string.'|'.$source;
|
$cache_key = $name.'|'.$string.'|'.$source;
|
||||||
if (!isset($lang_cache[$cache_key]))
|
if (!isset($lang_cache[$cache_key]))
|
||||||
{
|
{
|
||||||
if (!is_array($_MODULES))
|
if ($_MODULES == null)
|
||||||
return str_replace('"', '"', $string);
|
return str_replace('"', '"', $string);
|
||||||
|
|
||||||
// set array key to lowercase for 1.3 compatibility
|
// set array key to lowercase for 1.3 compatibility
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ function smartyTranslate($params, &$smarty)
|
|||||||
else if ($params['pdf'])
|
else if ($params['pdf'])
|
||||||
return Translate::getPdfTranslation($params['s']);
|
return Translate::getPdfTranslation($params['s']);
|
||||||
|
|
||||||
if (is_array($lang_array) && key_exists($key, $lang_array))
|
if ($lang_array != null && isset($lang_array[$key]))
|
||||||
$msg = $lang_array[$key];
|
$msg = $lang_array[$key];
|
||||||
elseif (is_array($lang_array) && key_exists(Tools::strtolower($key), $lang_array))
|
elseif ($lang_array != null && isset($lang_array[Tools::strtolower($key)]))
|
||||||
$msg = $lang_array[Tools::strtolower($key)];
|
$msg = $lang_array[Tools::strtolower($key)];
|
||||||
else
|
else
|
||||||
$msg = $params['s'];
|
$msg = $params['s'];
|
||||||
|
|||||||
Reference in New Issue
Block a user