From 161180cdf4e915526bc8d62c0301a09130fbf59e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 6 Feb 2015 16:12:45 +0100 Subject: Add sshd config module --- modules/translation.inc.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'modules/translation.inc.php') diff --git a/modules/translation.inc.php b/modules/translation.inc.php index 4dc2f515..5b8b452a 100644 --- a/modules/translation.inc.php +++ b/modules/translation.inc.php @@ -13,9 +13,6 @@ class Page_Translation extends Page */ private $template = false; private $page = false; - private $update = false; - private $delete = false; - private $tags = false; protected function doPreprocess() { @@ -74,6 +71,14 @@ class Page_Translation extends Page 'tags' => $this->loadSettingsArray() )); break; + case 'config-module': + //renders the hardcoded messages edit page + Render::addTemplate('translation/edit', array( + 'path' => 'config-module', + 'langs' => $langs, + 'tags' => $this->buildTranslationTable('config-module') + )); + break; case 'template': $this->template = Util::safePath($this->template); if ($this->template === false) { @@ -315,8 +320,7 @@ class Page_Translation extends Page } } } - - //finds every JSON tag withing the JSON language files + // Finds every JSON tag withing the JSON language files foreach ($langArray as $lang) { $jsonTags = Dictionary::getArray($path, $lang); if (!is_array($jsonTags)) @@ -333,6 +337,13 @@ class Page_Translation extends Page $tags[$tag]['missing'] --; } } + // Fill the blanks + foreach ($langArray as $lang) { + foreach (array_keys($tags) as $tagName) { + if (!isset($tags[$tagName]['langs'][$lang])) + $tags[$tagName]['langs'][$lang]['lang'] = $lang; + } + } // Finally remove $lang from the keys so mustache will iterate over them via {{#..}} foreach ($tags as &$tag) { $tag['langs'] = array_values($tag['langs']); -- cgit v1.2.3-55-g7522