Skip to content
Snippets Groups Projects
Commit ed2e31f1 authored by Dick Visser's avatar Dick Visser
Browse files

Use full msgid string in twig template

This allows more graceful fallback for untranslated languages.
Also, use `raw` filter to keep the embedded HTML working.
parent 3c48cf20
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,12 @@ ...@@ -22,7 +22,12 @@
<div id="content"> <div id="content">
<div class="wrap"> <div class="wrap">
{% if not isProduction -%} {% if not isProduction -%}
<div class="message-box warning">{{ 'pre-production-warning' | trans }}</div> <div class="message-box warning">{{ (
"You are now accessing a pre-production system. This authentication setup " ~
"is for testing and pre-production verification only. If someone sent you " ~
"a link that pointed you here, and you are not <i>a tester</i> you " ~
"probably got the wrong link, and should <b>not be here</b>."
) | trans | raw }}</div>
{% endif -%} {% endif -%}
{% block contentwrapper -%} {% block contentwrapper -%}
{% block content %}{% endblock -%} {% block content %}{% endblock -%}
......
...@@ -208,5 +208,5 @@ if (!empty($this->data['htmlinject']['htmlContentPre'])) { ...@@ -208,5 +208,5 @@ if (!empty($this->data['htmlinject']['htmlContentPre'])) {
} }
$config = \SimpleSAML\Configuration::getInstance(); $config = \SimpleSAML\Configuration::getInstance();
if(! $config->getBoolean('production', true)) { if(! $config->getBoolean('production', true)) {
echo '<div class="caution">' . $this->t('{preprodwarning:warning:warning}'). '</div>'; echo '<div class="caution">' . $this->t('{preprodwarning:warning:warning}'). '</div>';
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment