summaryrefslogtreecommitdiffstats
path: root/modules/translation.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-06 16:12:45 +0100
committerSimon Rettberg2015-02-06 16:12:45 +0100
commit161180cdf4e915526bc8d62c0301a09130fbf59e (patch)
tree3f59fd0da89fe42c2838885eef82b23064cac8a4 /modules/translation.inc.php
parentFinish config module editing (diff)
downloadslx-admin-161180cdf4e915526bc8d62c0301a09130fbf59e.tar.gz
slx-admin-161180cdf4e915526bc8d62c0301a09130fbf59e.tar.xz
slx-admin-161180cdf4e915526bc8d62c0301a09130fbf59e.zip
Add sshd config module
Diffstat (limited to 'modules/translation.inc.php')
-rw-r--r--modules/translation.inc.php21
1 files changed, 16 insertions, 5 deletions
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']);