Create a new "configpage" hook for those modules that need to inject anything...
Create a new "configpage" hook for those modules that need to inject anything in the configuration page. This allows us to change the signature of the hook, so that we pass it the \SimpleSAML\XHTML\Template object and then the hook can not only add data to be passed to the twig template, but also add its own translation domain. This was needed because many modules were putting their translations inside "core", and when moving those to the modules themselves, the new translation system cannot perform the translation because only the translations for the current module in use are loaded (in the config page, that's the core module). Therefore, we needed a way to get the Localization instance from the template, and a way to pass that to the hook so that the hook can register the translations for its own module.
Showing
- lib/SimpleSAML/Locale/Localization.php 2 additions, 2 deletionslib/SimpleSAML/Locale/Localization.php
- lib/SimpleSAML/XHTML/Template.php 11 additions, 0 deletionslib/SimpleSAML/XHTML/Template.php
- modules/consentAdmin/dictionaries/consentadmin.definition.json 3 additions, 0 deletions...es/consentAdmin/dictionaries/consentadmin.definition.json
- modules/consentAdmin/dictionaries/consentadmin.translation.json 5 additions, 0 deletions...s/consentAdmin/dictionaries/consentadmin.translation.json
- modules/consentAdmin/hooks/hook_configpage.php 19 additions, 0 deletionsmodules/consentAdmin/hooks/hook_configpage.php
- modules/consentAdmin/hooks/hook_frontpage.php 0 additions, 17 deletionsmodules/consentAdmin/hooks/hook_frontpage.php
- modules/core/dictionaries/frontpage.definition.json 0 additions, 18 deletionsmodules/core/dictionaries/frontpage.definition.json
- modules/core/www/frontpage_config.php 4 additions, 0 deletionsmodules/core/www/frontpage_config.php
- modules/cron/dictionaries/cron.definition.json 3 additions, 0 deletionsmodules/cron/dictionaries/cron.definition.json
- modules/cron/dictionaries/cron.translation.json 5 additions, 0 deletionsmodules/cron/dictionaries/cron.translation.json
- modules/cron/hooks/hook_configpage.php 19 additions, 0 deletionsmodules/cron/hooks/hook_configpage.php
- modules/cron/hooks/hook_frontpage.php 0 additions, 17 deletionsmodules/cron/hooks/hook_frontpage.php
- modules/cron/locales/en/LC_MESSAGES/cron.po 2 additions, 0 deletionsmodules/cron/locales/en/LC_MESSAGES/cron.po
- modules/cron/locales/es/LC_MESSAGES/cron.po 2 additions, 0 deletionsmodules/cron/locales/es/LC_MESSAGES/cron.po
- modules/cron/locales/nb/LC_MESSAGES/cron.po 2 additions, 0 deletionsmodules/cron/locales/nb/LC_MESSAGES/cron.po
- modules/cron/locales/nn/LC_MESSAGES/cron.po 2 additions, 0 deletionsmodules/cron/locales/nn/LC_MESSAGES/cron.po
- modules/memcacheMonitor/dictionaries/memcachestat.definition.json 3 additions, 0 deletions...memcacheMonitor/dictionaries/memcachestat.definition.json
- modules/memcacheMonitor/dictionaries/memcachestat.translation.json 5 additions, 0 deletions...emcacheMonitor/dictionaries/memcachestat.translation.json
- modules/memcacheMonitor/hooks/hook_configpage.php 19 additions, 0 deletionsmodules/memcacheMonitor/hooks/hook_configpage.php
- modules/memcacheMonitor/hooks/hook_frontpage.php 0 additions, 17 deletionsmodules/memcacheMonitor/hooks/hook_frontpage.php
Loading
Please register or sign in to comment