From a2c22b15a82a3adf6cfca3f7ac75a7daeb8427bb Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Wed, 23 Nov 2011 15:28:05 +0000 Subject: [PATCH] // Fix helper translations --- classes/AdminController.php | 2 ++ controllers/admin/AdminTranslationsController.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/AdminController.php b/classes/AdminController.php index 5d8034df3..57a6b9290 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -1554,6 +1554,8 @@ class AdminControllerCore extends Controller // @todo : change AdminTab to Helper if ( isset($_LANGADM[$class.$key])) $str = $_LANGADM[$class.$key]; + elseif ( isset($_LANGADM['helper'.$key])) + $str = $_LANGADM['helper'.$key]; elseif ( isset($_LANGADM['admintab'.$key])) $str = $_LANGADM['admintab'.$key]; else diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index f05364f32..d1d80dd4a 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -916,7 +916,7 @@ class AdminTranslationsControllerCore extends AdminController // -4 becomes -14 to remove the ending "Controller.php" from the filename $prefix_key = basename(substr($tab, 0, -14)); - // @todo this is retrcompatible, but we should not leave this + // @todo this is retrocompatible, but we should not leave this if ( $prefix_key == 'Admin') $prefix_key = 'AdminController'; $fd = fopen($tpl, 'r'); @@ -978,6 +978,8 @@ class AdminTranslationsControllerCore extends AdminController // get controller name instead of file name $prefix_key = Tools::toCamelCase(str_replace(_PS_ADMIN_DIR_.DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR, '', $tpl), true); $prefix_key = 'Admin'.substr($prefix_key, 0, strpos($prefix_key, DIRECTORY_SEPARATOR)); + if ($prefix_key == 'AdminHelper') + $prefix_key = 'Helper'; // @todo retrompatibility : we assume here than files directly in template/ // use the prefix "AdminController" (like old php files 'header', 'footer.inc', 'index', 'login', 'password', 'functions'