diff options
author | Simon Rettberg | 2016-05-10 16:57:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-10 16:57:06 +0200 |
commit | 2fa2bb665d8ca5e837147f85267f865f1b8b0503 (patch) | |
tree | b2e49bb825e1cc421597a681351d04b97c91834c /inc/module.inc.php | |
parent | Message string editing works now (diff) | |
download | slx-admin-2fa2bb665d8ca5e837147f85267f865f1b8b0503.tar.gz slx-admin-2fa2bb665d8ca5e837147f85267f865f1b8b0503.tar.xz slx-admin-2fa2bb665d8ca5e837147f85267f865f1b8b0503.zip |
Translating module strings and custom sections works
Diffstat (limited to 'inc/module.inc.php')
-rw-r--r-- | inc/module.inc.php | 17 |
1 files changed, 2 insertions, 15 deletions
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; - } } |