summaryrefslogtreecommitdiffstats
path: root/inc/module.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-10 16:57:06 +0200
committerSimon Rettberg2016-05-10 16:57:06 +0200
commit2fa2bb665d8ca5e837147f85267f865f1b8b0503 (patch)
treeb2e49bb825e1cc421597a681351d04b97c91834c /inc/module.inc.php
parentMessage string editing works now (diff)
downloadslx-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.php17
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;
- }
}