summaryrefslogtreecommitdiffstats
path: root/modules-available/main/hooks
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-10 19:17:28 +0200
committerSimon Rettberg2016-05-10 19:17:28 +0200
commita79bbfa1a23838b91e9a08f7014c2c7304976714 (patch)
treefafb56190707d10b01cb282bc14b99156e100dcb /modules-available/main/hooks
parentTranslating module strings and custom sections works (diff)
downloadslx-admin-a79bbfa1a23838b91e9a08f7014c2c7304976714.tar.gz
slx-admin-a79bbfa1a23838b91e9a08f7014c2c7304976714.tar.xz
slx-admin-a79bbfa1a23838b91e9a08f7014c2c7304976714.zip
Migrated messages to modules
Diffstat (limited to 'modules-available/main/hooks')
-rw-r--r--modules-available/main/hooks/translation.inc.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules-available/main/hooks/translation.inc.php b/modules-available/main/hooks/translation.inc.php
index 8c0e4b51..c831cbfd 100644
--- a/modules-available/main/hooks/translation.inc.php
+++ b/modules-available/main/hooks/translation.inc.php
@@ -6,7 +6,7 @@ $HANDLER = array();
* List of valid subsections
*/
$HANDLER['subsections'] = array(
- 'categories'
+ 'categories', 'global-tags'
);
/*
@@ -28,3 +28,16 @@ $HANDLER['grep_categories'] = function($module) {
}
return $want;
};
+
+/**
+ * Global tags.
+ * This just returns the union of global tags of all languages, as there is no
+ * way to define a definite set of required global tags.
+ */
+$HANDLER['grep_global-tags'] = function($module) {
+ $want = array();
+ foreach (Dictionary::getLanguages() as $lang) {
+ $want += Dictionary::getArray($module->getIdentifier(), 'global-tags', $lang);
+ }
+ return $want;
+};