From 6e2fb56419aa550291f2a9b4ceea0da7adac9d2f Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Tue, 27 Feb 2024 16:03:22 +0530 Subject: [PATCH] Resolve translated text not visible on admin controllers --- config/smartyadmin.config.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/smartyadmin.config.inc.php b/config/smartyadmin.config.inc.php index fe1a3aa41..af78ae602 100644 --- a/config/smartyadmin.config.inc.php +++ b/config/smartyadmin.config.inc.php @@ -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