summaryrefslogtreecommitdiffstats
path: root/inc/dictionary.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-04 18:27:28 +0200
committerSimon Rettberg2016-05-04 18:27:28 +0200
commit80424b29e00609bf837119fa810b5afdadf2b4e9 (patch)
treee59c49265aeb219c4137bdf21e71262201345b99 /inc/dictionary.inc.php
parentWIP (diff)
downloadslx-admin-80424b29e00609bf837119fa810b5afdadf2b4e9.tar.gz
slx-admin-80424b29e00609bf837119fa810b5afdadf2b4e9.tar.xz
slx-admin-80424b29e00609bf837119fa810b5afdadf2b4e9.zip
Work on translations: templates and messages work
Diffstat (limited to 'inc/dictionary.inc.php')
-rw-r--r--inc/dictionary.inc.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php
index e8f51e24..c139c8bf 100644
--- a/inc/dictionary.inc.php
+++ b/inc/dictionary.inc.php
@@ -49,11 +49,6 @@ class Dictionary
define('LANG', $language);
}
- public static function getArrayTemplate($template, $module, $lang = false)
- {
- return self::getArray($module, 'templates/' . $template, $lang);
- }
-
public static function getArray($module, $path, $lang = false)
{
if ($lang === false)
@@ -84,12 +79,12 @@ class Dictionary
public static function getMessage($id)
{
- if (!preg_match('/^(\w+)\.(\w+)$/', id, $out)) {
+ if (!preg_match('/^(\w+)\.(.+)$/', $id, $out)) {
return 'Invalid Message ID format: ' . $id;
}
$string = self::translate($out[1], 'messages', $out[2]);
if ($string === false) {
- return $id;
+ return "($id) ({{0}}, {{1}}, {{2}}, {{3}})";
}
return $string;
}