From 80424b29e00609bf837119fa810b5afdadf2b4e9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 4 May 2016 18:27:28 +0200 Subject: Work on translations: templates and messages work --- inc/dictionary.inc.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'inc/dictionary.inc.php') 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; } -- cgit v1.2.3-55-g7522