From 2fa2bb665d8ca5e837147f85267f865f1b8b0503 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 10 May 2016 16:57:06 +0200 Subject: Translating module strings and custom sections works --- inc/module.inc.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'inc/module.inc.php') diff --git a/inc/module.inc.php b/inc/module.inc.php index 292c744a..261c2990 100644 --- a/inc/module.inc.php +++ b/inc/module.inc.php @@ -156,7 +156,7 @@ class Module public function getDisplayName() { - $string = Dictionary::translate($this->name, 'module', 'module_name'); + $string = Dictionary::translateFileModule($this->name, 'module', 'module_name'); if ($string === false) { return '!!' . $this->name . '!!'; } @@ -165,7 +165,7 @@ class Module public function getPageTitle() { - return Dictionary::translate($this->name, 'module', 'page_title'); + return Dictionary::translateFileModule($this->name, 'module', 'page_title'); } public function getCategory() @@ -177,18 +177,5 @@ class Module { return Dictionary::getCategoryName($this->category); } - - public function translate($tag, $section = 'module') - { - $string = Dictionary::translate($this->name, $section, $tag); - if ($string === false) { - $string = Dictionary::translate('core', $section, $tag); - } - if ($string === false) { - error_log('Translation not found. Module: ' . $this->name . ', section: ' . $section . ', tag: ' . $tag); - $string = '!!' . $tag . '!!'; - } - return $string; - } } -- cgit v1.2.3-55-g7522