diff --git a/lib/SimpleSAML/Locale/Localization.php b/lib/SimpleSAML/Locale/Localization.php index 66427da457578cc1cb8ea9e4f398bf0e1d3bae58..822a71f96f80d59c5376215c65598137a04a9d9e 100644 --- a/lib/SimpleSAML/Locale/Localization.php +++ b/lib/SimpleSAML/Locale/Localization.php @@ -126,7 +126,7 @@ class Localization } - /* + /** * Add a new translation domain from a module * (We're assuming that each domain only exists in one place) * @@ -142,7 +142,7 @@ class Localization } - /* + /** * Add a new translation domain * (We're assuming that each domain only exists in one place) * diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 903076ff67f701a2d66f6bcb691e8305fb1b69d5..b055ef4a7d0601ce9494bdc19a1e412b9585a8c3 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -583,6 +583,17 @@ class Template extends Response } + /** + * Return the internal localization object used by this template. + * + * @return \SimpleSAML\Locale\Localization The localization object that will be used with this template. + */ + public function getLocalization() + { + return $this->localization; + } + + /** * Get the current instance of Twig in use. * diff --git a/modules/consentAdmin/dictionaries/consentadmin.definition.json b/modules/consentAdmin/dictionaries/consentadmin.definition.json index 01a48eddb226ef703cd0a5699798c73772e27000..7864ff142f7507f33e3c30217672b68f41fb6df9 100644 --- a/modules/consentAdmin/dictionaries/consentadmin.definition.json +++ b/modules/consentAdmin/dictionaries/consentadmin.definition.json @@ -58,5 +58,8 @@ }, "consentadmin_purpose": { "en": "The purpose of the service is" + }, + "link_consentAdmin": { + "en": "Consent administration" } } diff --git a/modules/consentAdmin/dictionaries/consentadmin.translation.json b/modules/consentAdmin/dictionaries/consentadmin.translation.json index 18af923572217905c30575593f096aad44162623..fcc1ef52f84b60a0430e3479a5bc7432745ee1bf 100644 --- a/modules/consentAdmin/dictionaries/consentadmin.translation.json +++ b/modules/consentAdmin/dictionaries/consentadmin.translation.json @@ -598,5 +598,10 @@ "cs": "\u00da\u010del slu\u017eby je", "eu": "Zerbitzuaren xedea hau da", "el": "\u039f \u03c3\u03ba\u03bf\u03c0\u03cc\u03c2 \u03c4\u03b7\u03c2 \u03c5\u03c0\u03b7\u03c1\u03b5\u03c3\u03af\u03b1\u03c2 \u03b5\u03af\u03bd\u03b1\u03b9" + }, + "link_consentAdmin": { + "es": "AdministraciĂłn del consentimiento", + "no": "Samtykke administrasjon", + "nn": "Samtykke administrasjon" } } diff --git a/modules/consentAdmin/hooks/hook_configpage.php b/modules/consentAdmin/hooks/hook_configpage.php new file mode 100644 index 0000000000000000000000000000000000000000..f4db9b01d4e38b67c86897fa8a870e55a6df1088 --- /dev/null +++ b/modules/consentAdmin/hooks/hook_configpage.php @@ -0,0 +1,19 @@ +<?php +/** + * Hook to add the consentAdmin module to the config page. + * + * @param \SimpleSAML\XHTML\Template The template that we should alter in this hook. + */ + +function consentAdmin_hook_configpage(\SimpleSAML\XHTML\Template &$template) +{ + $template->data['links_config']['consentAdmin'] = [ + 'href' => SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php'), + 'text' => '{consentAdmin:consentadmin:link_consentAdmin}', + ]; + + $config = \SimpleSAML\Configuration::getInstance(); + if ($config->getBoolean('usenewui', false)) { + $template->getLocalization()->addModuleDomain('consentAdmin'); + } +} diff --git a/modules/consentAdmin/hooks/hook_frontpage.php b/modules/consentAdmin/hooks/hook_frontpage.php deleted file mode 100644 index 87edf27d2e41d58fa57f23c12e697612c2c4b9c6..0000000000000000000000000000000000000000 --- a/modules/consentAdmin/hooks/hook_frontpage.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Hook to add the consentAdmin module to the frontpage. - * - * @param array &$links The links on the frontpage, split into sections. - */ - -function consentAdmin_hook_frontpage(&$links) -{ - assert(is_array($links)); - assert(array_key_exists('links', $links)); - - $links['config'][] = [ - 'href' => SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php'), - 'text' => '{core:frontpage:link_consentAdmin}', - ]; -} diff --git a/modules/core/dictionaries/frontpage.definition.json b/modules/core/dictionaries/frontpage.definition.json index 57163f5d4deb70c2df9b9634246a094dc5dc4992..98efa68a1d7d07d63dd26d31766f038a77cb7ce3 100644 --- a/modules/core/dictionaries/frontpage.definition.json +++ b/modules/core/dictionaries/frontpage.definition.json @@ -110,27 +110,9 @@ "link_cleardiscochoices": { "en": "Delete my choices of IdP in the IdP discovery services" }, - "link_sanitycheck": { - "en": "Sanity check of your SimpleSAMLphp setup" - }, - "link_consentAdmin": { - "en": "Consent Administration" - }, - "link_memcacheMonitor": { - "en": "MemCache Statistics" - }, "link_oauth": { "en": "OAuth Consumer Registry" }, - "link_cron": { - "en": "Cron module information page" - }, - "link_statistics": { - "en": "Show statistics" - }, - "link_statistics_metadata": { - "en": "Show statistics metadata" - }, "link_metarefresh": { "en": "Metarefresh: fetch metadata" }, diff --git a/modules/core/www/frontpage_config.php b/modules/core/www/frontpage_config.php index 02accc6fb8da3ceaa3cf1e30abd9ec4f0af4f2ed..d01ade0c366ee63bfae789888419ffd67f88e756 100644 --- a/modules/core/www/frontpage_config.php +++ b/modules/core/www/frontpage_config.php @@ -53,6 +53,8 @@ $allLinks = [ 'federation' => &$links_federation, ]; \SimpleSAML\Module::callHooks('frontpage', $allLinks); +\SimpleSAML\Logger::debug('The "frontpage" hook has been deprecated for the configuration page. Implement the '.' + "configpage" hook instead.'); // Check for updates. Store the remote result in the session so we // don't need to fetch it on every access to this page. @@ -197,4 +199,6 @@ $t->data['requiredmap'] = [ $t->data['version'] = $config->getVersion(); $t->data['directory'] = dirname(dirname(dirname(dirname(__FILE__)))); +\SimpleSAML\Module::callHooks('configpage', $t); + $t->show(); diff --git a/modules/cron/dictionaries/cron.definition.json b/modules/cron/dictionaries/cron.definition.json index 74696abe0cfd2ca2c80e02652bae5919a6550687..1761506932335844977acf109a4c99120d430d22 100644 --- a/modules/cron/dictionaries/cron.definition.json +++ b/modules/cron/dictionaries/cron.definition.json @@ -22,5 +22,8 @@ }, "cron_report_title": { "en": "Cron report" + }, + "link_cron": { + "en": "Cron module information page" } } \ No newline at end of file diff --git a/modules/cron/dictionaries/cron.translation.json b/modules/cron/dictionaries/cron.translation.json index 95d78122a8d3194bfe309e9edf4e7644bf5e8b86..db5bfa4a29ddb455eb8b9a7c6809f075aa8134d1 100644 --- a/modules/cron/dictionaries/cron.translation.json +++ b/modules/cron/dictionaries/cron.translation.json @@ -254,5 +254,10 @@ "af": "Cron verslag", "pt-br": "Relat\u00f3rio do cron", "el": "\u0391\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac cron" + }, + "link_cron": { + "es": "Informe de cron", + "no": "Informasjon om cron", + "nn": "Informasjon om cron" } } diff --git a/modules/cron/hooks/hook_configpage.php b/modules/cron/hooks/hook_configpage.php new file mode 100644 index 0000000000000000000000000000000000000000..474c6acbc96ff5181d5eef298aecb833e3f3e3ac --- /dev/null +++ b/modules/cron/hooks/hook_configpage.php @@ -0,0 +1,19 @@ +<?php +/** + * Hook to add the cron module to the config page. + * + * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook. + */ + +function cron_hook_configpage(\SimpleSAML\XHTML\Template &$template) +{ + $template->data['links_config']['cron'] = [ + 'href' => SimpleSAML\Module::getModuleURL('cron/croninfo.php'), + 'text' => '{cron:cron:link_cron}', + ]; + + $config = \SimpleSAML\Configuration::getInstance(); + if ($config->getBoolean('usenewui', false)) { + $template->getLocalization()->addModuleDomain('cron'); + } +} diff --git a/modules/cron/hooks/hook_frontpage.php b/modules/cron/hooks/hook_frontpage.php deleted file mode 100644 index c9e2eb2dcb25e88141556375de42d44841a32a35..0000000000000000000000000000000000000000 --- a/modules/cron/hooks/hook_frontpage.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Hook to add the modinfo module to the frontpage. - * - * @param array &$links The links on the frontpage, split into sections. - */ - -function cron_hook_frontpage(&$links) -{ - assert(is_array($links)); - assert(array_key_exists('links', $links)); - - $links['config'][] = [ - 'href' => SimpleSAML\Module::getModuleURL('cron/croninfo.php'), - 'text' => '{core:frontpage:link_cron}', - ]; -} diff --git a/modules/cron/locales/en/LC_MESSAGES/cron.po b/modules/cron/locales/en/LC_MESSAGES/cron.po index 21c02a769e8f717925eba0578588ab1c09ba25a3..aa2e95e781bc6eeb685270a9eabd4a1c67298e62 100644 --- a/modules/cron/locales/en/LC_MESSAGES/cron.po +++ b/modules/cron/locales/en/LC_MESSAGES/cron.po @@ -63,3 +63,5 @@ msgstr "Here are the result for the cron job execution:" msgid "Cron result page" msgstr "Cron result page" +msgid "{cron:cron:link_cron}" +msgstr "Cron module information page" diff --git a/modules/cron/locales/es/LC_MESSAGES/cron.po b/modules/cron/locales/es/LC_MESSAGES/cron.po index a8a03ec8acfa3740f6c290bed6535388165fc2f9..5a8b9dbe15559290ea6e01189bacdb0531734147 100644 --- a/modules/cron/locales/es/LC_MESSAGES/cron.po +++ b/modules/cron/locales/es/LC_MESSAGES/cron.po @@ -63,3 +63,5 @@ msgstr "Aqui están los resultados de las tareas en la ejecuciĂłn del cron:" msgid "Cron result page" msgstr "Página de resultado del cron" +msgid "{cron:cron:link_cron}" +msgstr "Informe de cron" diff --git a/modules/cron/locales/nb/LC_MESSAGES/cron.po b/modules/cron/locales/nb/LC_MESSAGES/cron.po index f6ba2ef3c3e770c0297f7e89f9d984e076db2cba..aaec4ad381ac2f62a6bf1e93249ee1b6e41e28c6 100644 --- a/modules/cron/locales/nb/LC_MESSAGES/cron.po +++ b/modules/cron/locales/nb/LC_MESSAGES/cron.po @@ -63,3 +63,5 @@ msgstr "Her er resultatene fra kjøring av cron-jobben:" msgid "Cron result page" msgstr "Cron resultatside" +msgid "{cron:cron:link_cron}" +msgstr "Informasjon om cron" diff --git a/modules/cron/locales/nn/LC_MESSAGES/cron.po b/modules/cron/locales/nn/LC_MESSAGES/cron.po index b782c3ad57d3eceed0b5e22637a72bf20bf40be9..5aeba2dd6673ef0281da7d97d1f06fd44d9ea502 100644 --- a/modules/cron/locales/nn/LC_MESSAGES/cron.po +++ b/modules/cron/locales/nn/LC_MESSAGES/cron.po @@ -63,3 +63,5 @@ msgstr "Her er resultata frĂĄ køyring av cron-jobben:" msgid "Cron result page" msgstr "Cron resultatside" +msgid "{cron:cron:link_cron}" +msgstr "Informasjon om cron" diff --git a/modules/memcacheMonitor/dictionaries/memcachestat.definition.json b/modules/memcacheMonitor/dictionaries/memcachestat.definition.json index 885b475085a28683868385d48391bb66e755f4f3..77817ff066835b7f63f05f164d72003e325b8338 100644 --- a/modules/memcacheMonitor/dictionaries/memcachestat.definition.json +++ b/modules/memcacheMonitor/dictionaries/memcachestat.definition.json @@ -142,5 +142,8 @@ }, "reclaimed": { "en": "Number of times an entry was stored using memory from an expired entry" + }, + "link_memcacheMonitor": { + "en": "Memcache statistics" } } diff --git a/modules/memcacheMonitor/dictionaries/memcachestat.translation.json b/modules/memcacheMonitor/dictionaries/memcachestat.translation.json index fbc7157e793a2371f9d7a6edc9f2d6bcfc4e54e6..e2361455c89cb646a743d25b9d2861b28792eaaf 100644 --- a/modules/memcacheMonitor/dictionaries/memcachestat.translation.json +++ b/modules/memcacheMonitor/dictionaries/memcachestat.translation.json @@ -549,5 +549,10 @@ "cs": "Celkov\u00e9 dostupn\u00e9 \u00falo\u017ei\u0161t\u011b", "eu": "Ustiatutako biltegiraketa guztira", "el": "\u0394\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03bf\u03c2 \u03c7\u03ce\u03c1\u03bf\u03c2 \u03b1\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7\u03c2" + }, + "link_memcacheMonitor": { + "es": "EstadĂsticas de memcache", + "no": "Memcache statistikker", + "nn": "Memcache statistikkar" } } diff --git a/modules/memcacheMonitor/hooks/hook_configpage.php b/modules/memcacheMonitor/hooks/hook_configpage.php new file mode 100644 index 0000000000000000000000000000000000000000..9e9689b08acd92fad2f6cd2d4ce73495d572d110 --- /dev/null +++ b/modules/memcacheMonitor/hooks/hook_configpage.php @@ -0,0 +1,19 @@ +<?php +/** + * Hook to add the memcacheMonitor module to the config page. + * + * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook. + */ + +function memcacheMonitor_hook_configpage(\SimpleSAML\XHTML\Template &$template) +{ + $template->data['links_config']['memcacheMonitor'] = [ + 'href' => SimpleSAML\Module::getModuleURL('memcacheMonitor/memcachestat.php'), + 'text' => '{memcacheMonitor:memcachestat:link_memcacheMonitor}', + ]; + + $config = \SimpleSAML\Configuration::getInstance(); + if ($config->getBoolean('usenewui', false)) { + $template->getLocalization()->addModuleDomain('memcacheMonitor'); + } +} diff --git a/modules/memcacheMonitor/hooks/hook_frontpage.php b/modules/memcacheMonitor/hooks/hook_frontpage.php deleted file mode 100644 index 9329d55317391c1db6c4e7e665185bf35ecc1bc8..0000000000000000000000000000000000000000 --- a/modules/memcacheMonitor/hooks/hook_frontpage.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Hook to add the simple consenet admin module to the frontpage. - * - * @param array &$links The links on the frontpage, split into sections. - */ - -function memcacheMonitor_hook_frontpage(&$links) -{ - assert(is_array($links)); - assert(array_key_exists('links', $links)); - - $links['config'][] = [ - 'href' => SimpleSAML\Module::getModuleURL('memcacheMonitor/memcachestat.php'), - 'text' => '{core:frontpage:link_memcacheMonitor}', - ]; -} diff --git a/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po index bab82dd3f380481d57cb1d0c8356a57d9fef53e9..29afe1b3b2b5017c28ffc52e0f64d763adbee9c4 100644 --- a/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po +++ b/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po @@ -264,3 +264,5 @@ msgstr "CPU Seconds (System)" msgid "Total connections" msgstr "Total connections" +msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}" +msgstr "Memcache statistics" diff --git a/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po index 0f9197c69cb1bba65fa2d5d268d35cef644ff86f..e9e23f7be4c6fdb1d050008f4b67bbba1e25f05d 100644 --- a/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po +++ b/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po @@ -129,3 +129,5 @@ msgstr "Segundos de CPU (Sistema)" msgid "Total connections" msgstr "Total de conexiones" +msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}" +msgstr "EstadĂsticas de memcache" diff --git a/modules/memcacheMonitor/locales/nb/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/nb/LC_MESSAGES/memcacheMonitor.po index 0fca4b31e0f4baeb6a19539d09eb074d9c1c9746..accddc9276462489be5d65cc77bf4c0893409416 100644 --- a/modules/memcacheMonitor/locales/nb/LC_MESSAGES/memcacheMonitor.po +++ b/modules/memcacheMonitor/locales/nb/LC_MESSAGES/memcacheMonitor.po @@ -129,3 +129,5 @@ msgstr "CPU Sekunder (system)" msgid "Total connections" msgstr "Totalt antall forbindelser" +msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}" +msgstr "Memcache statistikker" diff --git a/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po index d50527933728ab338ee4ec5d0650673f41066857..b54c5153182c0b6d50a93d1ba4e255cd9427f111 100644 --- a/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po +++ b/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po @@ -129,3 +129,5 @@ msgstr "CPU-sekund (system)" msgid "Total connections" msgstr "Opne tilkoplingar (totalt)" +msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}" +msgstr "Memcache statistikkar" diff --git a/modules/sanitycheck/dictionaries/strings.definition.json b/modules/sanitycheck/dictionaries/strings.definition.json new file mode 100644 index 0000000000000000000000000000000000000000..38aa732b32daec72c0ebecc77b37441802b93186 --- /dev/null +++ b/modules/sanitycheck/dictionaries/strings.definition.json @@ -0,0 +1,5 @@ +{ + "link_sanitycheck": { + "en": "Sanity check of your SimpleSAMLphp setup" + } +} \ No newline at end of file diff --git a/modules/sanitycheck/dictionaries/strings.translation.json b/modules/sanitycheck/dictionaries/strings.translation.json new file mode 100644 index 0000000000000000000000000000000000000000..a3940e048140e4371a2dd139dc7e4960f61738c1 --- /dev/null +++ b/modules/sanitycheck/dictionaries/strings.translation.json @@ -0,0 +1,7 @@ +{ + "link_sanitycheck": { + "es": "Comprobaciones básicas de la instalaciĂłn", + "no": "Sjekk din installasjon", + "nn": "Sjekk din installasjon" + } +} \ No newline at end of file diff --git a/modules/sanitycheck/hooks/hook_configpage.php b/modules/sanitycheck/hooks/hook_configpage.php new file mode 100644 index 0000000000000000000000000000000000000000..18b20e114521a5f6dea2aa2a4a5f82ca938f5563 --- /dev/null +++ b/modules/sanitycheck/hooks/hook_configpage.php @@ -0,0 +1,18 @@ +<?php +/** + * Hook to add the sanitycheck link to the config page. + * + * @param \SimpleSAML\XHTML\Template The template that we should alter in this hook. + */ +function sanitycheck_hook_configpage(\SimpleSAML\XHTML\Template &$template) +{ + $template->data['links_config']['sanitycheck'] = [ + 'href' => SimpleSAML\Module::getModuleURL('sanitycheck/index.php'), + 'text' => '{sanitycheck:strings:link_sanitycheck}', + ]; + + $config = \SimpleSAML\Configuration::getInstance(); + if ($config->getBoolean('usenewui', false)) { + $template->getLocalization()->addModuleDomain('sanitycheck'); + } +} diff --git a/modules/sanitycheck/hooks/hook_frontpage.php b/modules/sanitycheck/hooks/hook_frontpage.php deleted file mode 100644 index 95dddf7aa1861dab67ca05dc502e881795404421..0000000000000000000000000000000000000000 --- a/modules/sanitycheck/hooks/hook_frontpage.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -/** - * Hook to add the modinfo module to the frontpage. - * - * @param array &$links The links on the frontpage, split into sections. - */ -function sanitycheck_hook_frontpage(&$links) -{ - assert(is_array($links)); - assert(array_key_exists('links', $links)); - - $links['config']['sanitycheck'] = [ - 'href' => SimpleSAML\Module::getModuleURL('sanitycheck/index.php'), - 'text' => '{core:frontpage:link_sanitycheck}', - ]; -} diff --git a/modules/sanitycheck/locales/en/LC_MESSAGES/messages.po b/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po similarity index 56% rename from modules/sanitycheck/locales/en/LC_MESSAGES/messages.po rename to modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po index 2b50d34d18dce5a79e59d9c8139ea8d5172e2da9..7f1cd2174fe391f10f0bcb7d41ea4990b50bea32 100644 --- a/modules/sanitycheck/locales/en/LC_MESSAGES/messages.po +++ b/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po @@ -4,3 +4,5 @@ msgstr "These checks failed:" msgid "These checks succeeded:" msgstr "These checks succeeded:" +msgid "{sanitycheck:strings:link_sanitycheck}" +msgstr "Sanity check of your SimpleSAMLphp setup" \ No newline at end of file diff --git a/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po new file mode 100644 index 0000000000000000000000000000000000000000..0a98c4369b8c182144c3b08c0bdcfb184ce78962 --- /dev/null +++ b/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po @@ -0,0 +1,8 @@ +msgid "These checks failed:" +msgstr "Las siguientes comprobaciones han fallado:" + +msgid "These checks succeeded:" +msgstr "Las siguientes comprobaciones fueron satisfactorias:" + +msgid "{sanitycheck:strings:link_sanitycheck}" +msgstr "Comprobaciones básicas de la instalaciĂłn" diff --git a/modules/sanitycheck/locales/it/LC_MESSAGES/messages.po b/modules/sanitycheck/locales/it/LC_MESSAGES/sanitycheck.po similarity index 100% rename from modules/sanitycheck/locales/it/LC_MESSAGES/messages.po rename to modules/sanitycheck/locales/it/LC_MESSAGES/sanitycheck.po diff --git a/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po new file mode 100644 index 0000000000000000000000000000000000000000..c582429c3ca084cf95884f3f46e715d7ff4039e0 --- /dev/null +++ b/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po @@ -0,0 +1,8 @@ +msgid "These checks failed:" +msgstr "Disse sjekkene har feila:" + +msgid "These checks succeeded:" +msgstr "Disse sjekkene var suksessfulle:" + +msgid "{sanitycheck:strings:link_sanitycheck}" +msgstr "Sjekk din installasjon" diff --git a/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po new file mode 100644 index 0000000000000000000000000000000000000000..f49cb022617d7c7ebfd4a853d915b83561e5bc78 --- /dev/null +++ b/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po @@ -0,0 +1,8 @@ +msgid "These checks failed:" +msgstr "These checks failed:" + +msgid "These checks succeeded:" +msgstr "Desse sjekkane var suksessfulle:" + +msgid "{sanitycheck:strings:link_sanitycheck}" +msgstr "Sjekk din installasjon" diff --git a/modules/statistics/dictionaries/statistics.definition.json b/modules/statistics/dictionaries/statistics.definition.json new file mode 100644 index 0000000000000000000000000000000000000000..065b7b4d386391ae247300b09bd6c249172ea039 --- /dev/null +++ b/modules/statistics/dictionaries/statistics.definition.json @@ -0,0 +1,8 @@ +{ + "link_statistics": { + "en": "Show statistics" + }, + "link_statistics_metadata": { + "en": "Show statistics metadata" + } +} \ No newline at end of file diff --git a/modules/statistics/dictionaries/statistics.translation.json b/modules/statistics/dictionaries/statistics.translation.json new file mode 100644 index 0000000000000000000000000000000000000000..1f51b3838702c7c63bec80471e460812795d4ce1 --- /dev/null +++ b/modules/statistics/dictionaries/statistics.translation.json @@ -0,0 +1,12 @@ +{ + "link_statistics": { + "es": "Mostrar estadĂsticas", + "no": "Vis statistikker", + "nn": "Vis statistikkar" + }, + "link_statistics_metadata": { + "es": "Mostrar metadatos de las estadĂsticas", + "no": "Vis metadata om statistikker", + "nn": "Vis metadata om statistikkar" + } +} diff --git a/modules/statistics/hooks/hook_configpage.php b/modules/statistics/hooks/hook_configpage.php new file mode 100644 index 0000000000000000000000000000000000000000..33a93f1b149be0b0caef85caef14926a7897267e --- /dev/null +++ b/modules/statistics/hooks/hook_configpage.php @@ -0,0 +1,23 @@ +<?php +/** + * Hook to add the statistics module to the config page. + * + * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook. + */ +function statistics_hook_configpage(\SimpleSAML\XHTML\Template &$template) +{ + $template->data['links_config']['statistics'] = [ + 'href' => SimpleSAML\Module::getModuleURL('statistics/showstats.php'), + 'text' => '{statistics:statistics:link_statistics}', + ]; + $template->data['links_config']['statisticsmeta'] = [ + 'href' => SimpleSAML\Module::getModuleURL('statistics/statmeta.php'), + 'text' => '{statistics:statistics:link_statistics_metadata}', + 'shorttext' => ['en' => 'Statistics metadata', 'no' => 'Statistikk metadata'], + ]; + + $config = \SimpleSAML\Configuration::getInstance(); + if ($config->getBoolean('usenewui', false)) { + $template->getLocalization()->addModuleDomain('statistics'); + } +} diff --git a/modules/statistics/hooks/hook_frontpage.php b/modules/statistics/hooks/hook_frontpage.php deleted file mode 100644 index 462a300bfb265e8c0a97036c4df9084743a8e4cf..0000000000000000000000000000000000000000 --- a/modules/statistics/hooks/hook_frontpage.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Hook to add the modinfo module to the frontpage. - * - * @param array &$links The links on the frontpage, split into sections. - */ -function statistics_hook_frontpage(&$links) -{ - assert(is_array($links)); - assert(array_key_exists('links', $links)); - - $links['config']['statistics'] = [ - 'href' => SimpleSAML\Module::getModuleURL('statistics/showstats.php'), - 'text' => '{core:frontpage:link_statistics}', - ]; - $links['config']['statisticsmeta'] = [ - 'href' => SimpleSAML\Module::getModuleURL('statistics/statmeta.php'), - 'text' => '{core:frontpage:link_statistics_metadata}', - 'shorttext' => ['en' => 'Statistics metadata', 'no' => 'Statistikk metadata'], - ]; -} diff --git a/modules/statistics/locales/en/LC_MESSAGES/statistics.po b/modules/statistics/locales/en/LC_MESSAGES/statistics.po new file mode 100644 index 0000000000000000000000000000000000000000..9c5a14b57f9925477b9a8d3cbf2a242aaff790fe --- /dev/null +++ b/modules/statistics/locales/en/LC_MESSAGES/statistics.po @@ -0,0 +1,5 @@ +msgid "{statistics:statistics:link_statistics" +msgstr "Show statistics" + +msgid "{statistics:statistics:link_statistics_metadata" +msgstr "Show statistics metadata" \ No newline at end of file diff --git a/modules/statistics/locales/es/LC_MESSAGES/statistics.po b/modules/statistics/locales/es/LC_MESSAGES/statistics.po new file mode 100644 index 0000000000000000000000000000000000000000..23f72c387e01c4cf3155131b564990743a526776 --- /dev/null +++ b/modules/statistics/locales/es/LC_MESSAGES/statistics.po @@ -0,0 +1,5 @@ +msgid "{statistics:statistics:link_statistics" +msgstr "Mostrar estadĂsticas" + +msgid "{statistics:statistics:link_statistics_metadata" +msgstr "Mostrar metadatos de las estadĂsticas" \ No newline at end of file diff --git a/modules/statistics/locales/nb/LC_MESSAGES/statistics.po b/modules/statistics/locales/nb/LC_MESSAGES/statistics.po new file mode 100644 index 0000000000000000000000000000000000000000..c2686f160da56992cfbef90ab01ab39f472bda4e --- /dev/null +++ b/modules/statistics/locales/nb/LC_MESSAGES/statistics.po @@ -0,0 +1,5 @@ +msgid "{statistics:statistics:link_statistics" +msgstr "Vis statistikker" + +msgid "{statistics:statistics:link_statistics_metadata" +msgstr "Vis metadata om statistikker" diff --git a/modules/statistics/locales/nn/LC_MESSAGES/statistics.po b/modules/statistics/locales/nn/LC_MESSAGES/statistics.po new file mode 100644 index 0000000000000000000000000000000000000000..30cd4a568bebf6d2fa7acd6645dc56e759d242aa --- /dev/null +++ b/modules/statistics/locales/nn/LC_MESSAGES/statistics.po @@ -0,0 +1,5 @@ +msgid "{statistics:statistics:link_statistics" +msgstr "Vis statistikkar" + +msgid "{statistics:statistics:link_statistics_metadata" +msgstr "Vis metadata om statistikkar"