From 1892d3e4d29c6dda399197dd44b916381537ae1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no>
Date: Tue, 27 Nov 2018 14:34:01 +0100
Subject: [PATCH] Do not use the new configpage hook yet.

We'll use it in the new admin interface. For now, we just fix the old hook so that translations work for strings stored in dictionaries in the hooking module.
---
 .../consentAdmin/hooks/hook_configpage.php    | 10 +++------
 modules/consentAdmin/hooks/hook_frontpage.php | 18 +++++++++++++++
 .../locales/en/LC_MESSAGES/consentAdmin.po    |  3 +++
 .../locales/es/LC_MESSAGES/consentAdmin.po    |  2 ++
 .../locales/nb/LC_MESSAGES/consentAdmin.po    |  2 ++
 .../locales/nn/LC_MESSAGES/consentAdmin.po    |  2 ++
 modules/core/www/frontpage_config.php         |  2 --
 modules/cron/hooks/hook_configpage.php        | 10 +++------
 modules/cron/hooks/hook_frontpage.php         | 18 +++++++++++++++
 modules/cron/locales/en/LC_MESSAGES/cron.po   |  3 +++
 modules/cron/locales/es/LC_MESSAGES/cron.po   |  3 +++
 modules/cron/locales/nb/LC_MESSAGES/cron.po   |  3 +++
 modules/cron/locales/nn/LC_MESSAGES/cron.po   |  3 +++
 .../memcacheMonitor/hooks/hook_configpage.php | 10 +++------
 .../memcacheMonitor/hooks/hook_frontpage.php  | 18 +++++++++++++++
 .../locales/en/LC_MESSAGES/memcacheMonitor.po |  3 +++
 .../locales/es/LC_MESSAGES/memcacheMonitor.po |  3 +++
 .../locales/nb/LC_MESSAGES/memcacheMonitor.po |  3 +++
 .../locales/nn/LC_MESSAGES/memcacheMonitor.po |  3 +++
 modules/sanitycheck/hooks/hook_configpage.php | 10 +++------
 modules/sanitycheck/hooks/hook_frontpage.php  | 17 ++++++++++++++
 .../locales/en/LC_MESSAGES/sanitycheck.po     |  3 +++
 .../locales/es/LC_MESSAGES/sanitycheck.po     |  3 +++
 .../locales/nb/LC_MESSAGES/sanitycheck.po     |  3 +++
 .../locales/nn/LC_MESSAGES/sanitycheck.po     |  3 +++
 modules/statistics/hooks/hook_configpage.php  | 15 +++++--------
 modules/statistics/hooks/hook_frontpage.php   | 22 +++++++++++++++++++
 .../locales/en/LC_MESSAGES/statistics.po      |  6 +++++
 .../locales/es/LC_MESSAGES/statistics.po      |  6 +++++
 .../locales/nb/LC_MESSAGES/statistics.po      |  6 +++++
 .../locales/nn/LC_MESSAGES/statistics.po      |  6 +++++
 31 files changed, 179 insertions(+), 40 deletions(-)
 create mode 100644 modules/consentAdmin/hooks/hook_frontpage.php
 create mode 100644 modules/cron/hooks/hook_frontpage.php
 create mode 100644 modules/memcacheMonitor/hooks/hook_frontpage.php
 create mode 100644 modules/sanitycheck/hooks/hook_frontpage.php
 create mode 100644 modules/statistics/hooks/hook_frontpage.php

diff --git a/modules/consentAdmin/hooks/hook_configpage.php b/modules/consentAdmin/hooks/hook_configpage.php
index f4db9b01d..44ced16f2 100644
--- a/modules/consentAdmin/hooks/hook_configpage.php
+++ b/modules/consentAdmin/hooks/hook_configpage.php
@@ -7,13 +7,9 @@
 
 function consentAdmin_hook_configpage(\SimpleSAML\XHTML\Template &$template)
 {
-    $template->data['links_config']['consentAdmin'] = [
+    $template->data['links']['consentAdmin'] = [
         'href' => SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php'),
-        'text' => '{consentAdmin:consentadmin:link_consentAdmin}',
+        'text' => \SimpleSAML\Locale\Translate::noop('Consent administration'),
     ];
-
-    $config = \SimpleSAML\Configuration::getInstance();
-    if ($config->getBoolean('usenewui', false)) {
-        $template->getLocalization()->addModuleDomain('consentAdmin');
-    }
+    $template->getLocalization()->addModuleDomain('consentAdmin');
 }
diff --git a/modules/consentAdmin/hooks/hook_frontpage.php b/modules/consentAdmin/hooks/hook_frontpage.php
new file mode 100644
index 000000000..b1903a580
--- /dev/null
+++ b/modules/consentAdmin/hooks/hook_frontpage.php
@@ -0,0 +1,18 @@
+<?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' => '{consentAdmin:consentadmin:link_consentAdmin}',
+    ];
+}
+
diff --git a/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po
index ea3d3207f..8d8ec9af9 100644
--- a/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po
+++ b/modules/consentAdmin/locales/en/LC_MESSAGES/consentAdmin.po
@@ -168,3 +168,6 @@ msgstr "show/hide attributes"
 msgid "Organisation"
 msgstr "Organisation"
 
+msgid "Consent administration"
+msgstr "Consent administration"
+
diff --git a/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po
index 6d937dde8..21b40476c 100644
--- a/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po
+++ b/modules/consentAdmin/locales/es/LC_MESSAGES/consentAdmin.po
@@ -162,3 +162,5 @@ msgstr "Mostrar/ocultar atributos"
 msgid "Organisation"
 msgstr "OrganizaciĂłn"
 
+msgid "Consent administration"
+msgstr "AdministraciĂłn del consentimiento"
diff --git a/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po
index d981bba9d..a82000525 100644
--- a/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po
+++ b/modules/consentAdmin/locales/nb/LC_MESSAGES/consentAdmin.po
@@ -158,3 +158,5 @@ msgstr "vis/skjul persondata"
 msgid "Organisation"
 msgstr "Organisasjon"
 
+msgid "Consent administration"
+msgstr "Samtykke administrasjon"
diff --git a/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po b/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po
index dcfd7cba6..e4a712717 100644
--- a/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po
+++ b/modules/consentAdmin/locales/nn/LC_MESSAGES/consentAdmin.po
@@ -158,3 +158,5 @@ msgstr "vis/skjul personinformasjon"
 msgid "Organisation"
 msgstr "Organisasjon"
 
+msgid "Consent administration"
+msgstr "Samtykke administrasjon"
diff --git a/modules/core/www/frontpage_config.php b/modules/core/www/frontpage_config.php
index d01ade0c3..d1c4480dc 100644
--- a/modules/core/www/frontpage_config.php
+++ b/modules/core/www/frontpage_config.php
@@ -199,6 +199,4 @@ $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/hooks/hook_configpage.php b/modules/cron/hooks/hook_configpage.php
index 474c6acbc..dc3c8400b 100644
--- a/modules/cron/hooks/hook_configpage.php
+++ b/modules/cron/hooks/hook_configpage.php
@@ -7,13 +7,9 @@
 
 function cron_hook_configpage(\SimpleSAML\XHTML\Template &$template)
 {
-    $template->data['links_config']['cron'] = [
+    $template->data['links']['cron'] = [
         'href' => SimpleSAML\Module::getModuleURL('cron/croninfo.php'),
-        'text' => '{cron:cron:link_cron}',
+        'text' => \SimpleSAML\Locale\Translate::noop('Cron module information page'),
     ];
-
-    $config = \SimpleSAML\Configuration::getInstance();
-    if ($config->getBoolean('usenewui', false)) {
-        $template->getLocalization()->addModuleDomain('cron');
-    }
+    $template->getLocalization()->addModuleDomain('cron');
 }
diff --git a/modules/cron/hooks/hook_frontpage.php b/modules/cron/hooks/hook_frontpage.php
new file mode 100644
index 000000000..73fcd215b
--- /dev/null
+++ b/modules/cron/hooks/hook_frontpage.php
@@ -0,0 +1,18 @@
+<?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' => '{cron:cron:link_cron}',
+    ];
+}
+
diff --git a/modules/cron/locales/en/LC_MESSAGES/cron.po b/modules/cron/locales/en/LC_MESSAGES/cron.po
index aa2e95e78..d55e2ff67 100644
--- a/modules/cron/locales/en/LC_MESSAGES/cron.po
+++ b/modules/cron/locales/en/LC_MESSAGES/cron.po
@@ -65,3 +65,6 @@ msgstr "Cron result page"
 
 msgid "{cron:cron:link_cron}"
 msgstr "Cron module information page"
+
+msgid "Cron module information page"
+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 5a8b9dbe1..826d86fe8 100644
--- a/modules/cron/locales/es/LC_MESSAGES/cron.po
+++ b/modules/cron/locales/es/LC_MESSAGES/cron.po
@@ -65,3 +65,6 @@ msgstr "Página de resultado del cron"
 
 msgid "{cron:cron:link_cron}"
 msgstr "Informe de cron"
+
+msgid "Cron module information page"
+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 aaec4ad38..224c14a31 100644
--- a/modules/cron/locales/nb/LC_MESSAGES/cron.po
+++ b/modules/cron/locales/nb/LC_MESSAGES/cron.po
@@ -65,3 +65,6 @@ msgstr "Cron resultatside"
 
 msgid "{cron:cron:link_cron}"
 msgstr "Informasjon om cron"
+
+msgid "Cron module information page"
+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 5aeba2dd6..a326b56cb 100644
--- a/modules/cron/locales/nn/LC_MESSAGES/cron.po
+++ b/modules/cron/locales/nn/LC_MESSAGES/cron.po
@@ -65,3 +65,6 @@ msgstr "Cron resultatside"
 
 msgid "{cron:cron:link_cron}"
 msgstr "Informasjon om cron"
+
+msgid "Cron module information page"
+msgstr "Informasjon om cron"
diff --git a/modules/memcacheMonitor/hooks/hook_configpage.php b/modules/memcacheMonitor/hooks/hook_configpage.php
index 9e9689b08..4debe964e 100644
--- a/modules/memcacheMonitor/hooks/hook_configpage.php
+++ b/modules/memcacheMonitor/hooks/hook_configpage.php
@@ -7,13 +7,9 @@
 
 function memcacheMonitor_hook_configpage(\SimpleSAML\XHTML\Template &$template)
 {
-    $template->data['links_config']['memcacheMonitor'] = [
+    $template->data['links']['memcacheMonitor'] = [
         'href' => SimpleSAML\Module::getModuleURL('memcacheMonitor/memcachestat.php'),
-        'text' => '{memcacheMonitor:memcachestat:link_memcacheMonitor}',
+        'text' => \SimpleSAML\Locale\Translate::noop('Memcache statistics'),
     ];
-
-    $config = \SimpleSAML\Configuration::getInstance();
-    if ($config->getBoolean('usenewui', false)) {
-        $template->getLocalization()->addModuleDomain('memcacheMonitor');
-    }
+    $template->getLocalization()->addModuleDomain('memcacheMonitor');
 }
diff --git a/modules/memcacheMonitor/hooks/hook_frontpage.php b/modules/memcacheMonitor/hooks/hook_frontpage.php
new file mode 100644
index 000000000..d25437327
--- /dev/null
+++ b/modules/memcacheMonitor/hooks/hook_frontpage.php
@@ -0,0 +1,18 @@
+<?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' => '{memcacheMonitor:memcachestat:link_memcacheMonitor}',
+    ];
+}
+
diff --git a/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po
index 29afe1b3b..0c5bd95e4 100644
--- a/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po
+++ b/modules/memcacheMonitor/locales/en/LC_MESSAGES/memcacheMonitor.po
@@ -266,3 +266,6 @@ msgstr "Total connections"
 
 msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}"
 msgstr "Memcache statistics"
+
+msgid "Memcache statistics"
+msgstr "Memcache statistics"
diff --git a/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po
index e9e23f7be..0912705f3 100644
--- a/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po
+++ b/modules/memcacheMonitor/locales/es/LC_MESSAGES/memcacheMonitor.po
@@ -131,3 +131,6 @@ msgstr "Total de conexiones"
 
 msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}"
 msgstr "EstadĂ­sticas de memcache"
+
+msgid "Memcache statistics"
+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 accddc927..659cdd1ce 100644
--- a/modules/memcacheMonitor/locales/nb/LC_MESSAGES/memcacheMonitor.po
+++ b/modules/memcacheMonitor/locales/nb/LC_MESSAGES/memcacheMonitor.po
@@ -131,3 +131,6 @@ msgstr "Totalt antall forbindelser"
 
 msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}"
 msgstr "Memcache statistikker"
+
+msgid "Memcache statistics"
+msgstr "Memcache statistikker"
diff --git a/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po b/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po
index b54c51531..3b17ef3e6 100644
--- a/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po
+++ b/modules/memcacheMonitor/locales/nn/LC_MESSAGES/memcacheMonitor.po
@@ -131,3 +131,6 @@ msgstr "Opne tilkoplingar (totalt)"
 
 msgid "{memcacheMonitor:memcachestat:link_memcacheMonitor}"
 msgstr "Memcache statistikkar"
+
+msgid "Memcache statistics"
+msgstr "Memcache statistikkar"
diff --git a/modules/sanitycheck/hooks/hook_configpage.php b/modules/sanitycheck/hooks/hook_configpage.php
index 18b20e114..cab7fbf1d 100644
--- a/modules/sanitycheck/hooks/hook_configpage.php
+++ b/modules/sanitycheck/hooks/hook_configpage.php
@@ -6,13 +6,9 @@
  */
 function sanitycheck_hook_configpage(\SimpleSAML\XHTML\Template &$template)
 {
-    $template->data['links_config']['sanitycheck'] = [
+    $template->data['links']['sanitycheck'] = [
         'href' => SimpleSAML\Module::getModuleURL('sanitycheck/index.php'),
-        'text' => '{sanitycheck:strings:link_sanitycheck}',
+        'text' => \SimpleSAML\Locale\Translate::noop('Sanity check of your SimpleSAMLphp setup'),
     ];
-
-    $config = \SimpleSAML\Configuration::getInstance();
-    if ($config->getBoolean('usenewui', false)) {
-        $template->getLocalization()->addModuleDomain('sanitycheck');
-    }
+    $template->getLocalization()->addModuleDomain('sanitycheck');
 }
diff --git a/modules/sanitycheck/hooks/hook_frontpage.php b/modules/sanitycheck/hooks/hook_frontpage.php
new file mode 100644
index 000000000..1e860e6e6
--- /dev/null
+++ b/modules/sanitycheck/hooks/hook_frontpage.php
@@ -0,0 +1,17 @@
+<?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' => '{sanitycheck:strings:link_sanitycheck}',
+    ];
+}
+
diff --git a/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po
index 7f1cd2174..140725668 100644
--- a/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po
+++ b/modules/sanitycheck/locales/en/LC_MESSAGES/sanitycheck.po
@@ -5,4 +5,7 @@ msgid "These checks succeeded:"
 msgstr "These checks succeeded:"
 
 msgid "{sanitycheck:strings:link_sanitycheck}"
+msgstr "Sanity check of your SimpleSAMLphp setup"
+
+msgid "Sanity check of your SimpleSAMLphp setup"
 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
index 0a98c4369..8ccf3453d 100644
--- a/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po
+++ b/modules/sanitycheck/locales/es/LC_MESSAGES/sanitycheck.po
@@ -6,3 +6,6 @@ msgstr "Las siguientes comprobaciones fueron satisfactorias:"
 
 msgid "{sanitycheck:strings:link_sanitycheck}"
 msgstr "Comprobaciones básicas de la instalación"
+
+msgid "Sanity check of your SimpleSAMLphp setup"
+msgstr "Comprobaciones básicas de la instalación"
diff --git a/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po
index c582429c3..eed879944 100644
--- a/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po
+++ b/modules/sanitycheck/locales/nb/LC_MESSAGES/sanitycheck.po
@@ -6,3 +6,6 @@ msgstr "Disse sjekkene var suksessfulle:"
 
 msgid "{sanitycheck:strings:link_sanitycheck}"
 msgstr "Sjekk din installasjon"
+
+msgid "Sanity check of your SimpleSAMLphp setup"
+msgstr "Sjekk din installasjon"
diff --git a/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po b/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po
index f49cb0226..e3e4c989f 100644
--- a/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po
+++ b/modules/sanitycheck/locales/nn/LC_MESSAGES/sanitycheck.po
@@ -6,3 +6,6 @@ msgstr "Desse sjekkane var suksessfulle:"
 
 msgid "{sanitycheck:strings:link_sanitycheck}"
 msgstr "Sjekk din installasjon"
+
+msgid "Sanity check of your SimpleSAMLphp setup"
+msgstr "Sjekk din installasjon"
diff --git a/modules/statistics/hooks/hook_configpage.php b/modules/statistics/hooks/hook_configpage.php
index 33a93f1b1..d9c1f1df7 100644
--- a/modules/statistics/hooks/hook_configpage.php
+++ b/modules/statistics/hooks/hook_configpage.php
@@ -6,18 +6,13 @@
  */
 function statistics_hook_configpage(\SimpleSAML\XHTML\Template &$template)
 {
-    $template->data['links_config']['statistics'] = [
+    $template->data['links']['statistics'] = [
         'href' => SimpleSAML\Module::getModuleURL('statistics/showstats.php'),
-        'text' => '{statistics:statistics:link_statistics}',
+        'text' => \SimpleSAML\Locale\Translate::noop('Show statistics'),
     ];
-    $template->data['links_config']['statisticsmeta'] = [
+    $template->data['links']['statisticsmeta'] = [
         'href' => SimpleSAML\Module::getModuleURL('statistics/statmeta.php'),
-        'text' => '{statistics:statistics:link_statistics_metadata}',
-        'shorttext' => ['en' => 'Statistics metadata', 'no' => 'Statistikk metadata'],
+        'text' => \SimpleSAML\Locale\Translate::noop('Show statistics metadata'),
     ];
-
-    $config = \SimpleSAML\Configuration::getInstance();
-    if ($config->getBoolean('usenewui', false)) {
-        $template->getLocalization()->addModuleDomain('statistics');
-    }
+    $template->getLocalization()->addModuleDomain('statistics');
 }
diff --git a/modules/statistics/hooks/hook_frontpage.php b/modules/statistics/hooks/hook_frontpage.php
new file mode 100644
index 000000000..2dade3b2a
--- /dev/null
+++ b/modules/statistics/hooks/hook_frontpage.php
@@ -0,0 +1,22 @@
+<?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' => '{statistics:statistics:link_statistics}',
+    ];
+    $links['config']['statisticsmeta'] = [
+        'href' => SimpleSAML\Module::getModuleURL('statistics/statmeta.php'),
+        'text' => '{statistics:statistics: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
index 9c5a14b57..8dee6fd55 100644
--- a/modules/statistics/locales/en/LC_MESSAGES/statistics.po
+++ b/modules/statistics/locales/en/LC_MESSAGES/statistics.po
@@ -2,4 +2,10 @@ msgid "{statistics:statistics:link_statistics"
 msgstr "Show statistics"
 
 msgid "{statistics:statistics:link_statistics_metadata"
+msgstr "Show statistics metadata"
+
+msgid "Show statistics"
+msgstr "Show statistics"
+
+msgid "Show 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
index 23f72c387..871d82518 100644
--- a/modules/statistics/locales/es/LC_MESSAGES/statistics.po
+++ b/modules/statistics/locales/es/LC_MESSAGES/statistics.po
@@ -2,4 +2,10 @@ msgid "{statistics:statistics:link_statistics"
 msgstr "Mostrar estadĂ­sticas"
 
 msgid "{statistics:statistics:link_statistics_metadata"
+msgstr "Mostrar metadatos de las estadĂ­sticas"
+
+msgid "Show statistics"
+msgstr "Mostrar estadĂ­sticas"
+
+msgid "Show 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
index c2686f160..f67047785 100644
--- a/modules/statistics/locales/nb/LC_MESSAGES/statistics.po
+++ b/modules/statistics/locales/nb/LC_MESSAGES/statistics.po
@@ -3,3 +3,9 @@ msgstr "Vis statistikker"
 
 msgid "{statistics:statistics:link_statistics_metadata"
 msgstr "Vis metadata om statistikker"
+
+msgid "Show statistics"
+msgstr "Vis statistikker"
+
+msgid "Show 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
index 30cd4a568..6fb2e3bf4 100644
--- a/modules/statistics/locales/nn/LC_MESSAGES/statistics.po
+++ b/modules/statistics/locales/nn/LC_MESSAGES/statistics.po
@@ -3,3 +3,9 @@ msgstr "Vis statistikkar"
 
 msgid "{statistics:statistics:link_statistics_metadata"
 msgstr "Vis metadata om statistikkar"
+
+msgid "Show statistics"
+msgstr "Vis statistikkar"
+
+msgid "Show statistics metadata"
+msgstr "Vis metadata om statistikkar"
-- 
GitLab