Resolve translated text not visible on admin controllers

This commit is contained in:
Shreesh Arora
2024-02-27 16:03:22 +05:30
parent 17256b4ccb
commit 6e2fb56419

View File

@@ -68,7 +68,8 @@ function smartyTranslate($params, $smarty)
}
// If the tpl is used by a Helper
if (strpos($filename, 'helpers') === 0) {
$className = isset(Context::getContext()->controller->controller_name) ? Tools::toUnderscoreCase(substr(Context::getContext()->controller->controller_name, 5)) : '';
if (strpos($filename, 'helpers') === 0 && $className && strpos($smarty->source->name, '/template/controllers/'.$className.'/') === false) {
$class = 'Helper';
}
// If the tpl is used by a Controller