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/render.inc.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'inc/render.inc.php') diff --git a/inc/render.inc.php b/inc/render.inc.php index b8abaf71..6a2872f7 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -185,16 +185,13 @@ class Render } // Now find all language tags in this array if (preg_match_all('/{{(lang_.+?)}}/', $html, $out) > 0) { - $dictionary = Dictionary::getArrayTemplate($template, $module); + $dictionary = Dictionary::getArray($module, 'template-tags'); $fallback = false; foreach ($out[1] as $tag) { // Add untranslated strings to the dictionary, so their tag is seen in the rendered page if ($fallback === false && empty($dictionary[$tag])) { $fallback = true; // Fallback to general dictionary of module - $dictionary = $dictionary + Dictionary::getArray($module, 'module'); - if ($module !== 'main') { - $dictionary = $dictionary + Dictionary::getArray('main', 'module'); - } + $dictionary = $dictionary + Dictionary::getArray('main', 'global-template-tags'); } if (empty($dictionary[$tag])) { $dictionary[$tag] = '{{' . $tag . '}}'; -- cgit v1.2.3-55-g7522