// Fix backslashes on translations

This commit is contained in:
rGaillard
2011-11-02 10:35:09 +00:00
parent 1a515a8f38
commit 8473bc6afc
+2 -3
View File
@@ -33,12 +33,11 @@ function smartyTranslate($params, &$smarty)
$htmlentities = !isset($params['js']);
$addslashes = !isset($params['slashes']);
$string = str_replace('\'', '\\\'', $params['s']);
$filename = ((!isset($smarty->compiler_object) OR !is_object($smarty->compiler_object->template)) ? $smarty->template_resource : $smarty->compiler_object->template->getTemplateFilepath());
$class = Tools::substr(basename($filename), 0, -4);//.'_'.md5($string);
$class = Tools::substr(basename($filename), 0, -4);
if(in_array($class, array('header','footer','password','login')))
$class = 'index';
return AdminController::translate($string, $class, $addslashes, $htmlentities);
return AdminController::translate($params['s'], $class, $addslashes, $htmlentities);
}