Skip to content
Snippets Groups Projects
Commit 95ce1c10 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Remove deprecated use of translations

parent e469e49c
Branches
Tags
No related merge requests found
...@@ -67,11 +67,7 @@ if ($this->data['isadmin']) { ...@@ -67,11 +67,7 @@ if ($this->data['isadmin']) {
echo '<h2>' . $this->t('{core:frontpage:warnings}') . '</h2>'; echo '<h2>' . $this->t('{core:frontpage:warnings}') . '</h2>';
foreach($this->data['warnings'] AS $warning) { foreach($this->data['warnings'] AS $warning) {
if (is_array($warning)) { echo '<div class="caution">'.$warning.'</div>';
echo '<div class="caution">' . $this->t($warning[0], $warning[1]) . '</div>';
} else {
echo '<div class="caution">'.$this->t($warning).'</div>';
}
} }
} }
?> ?>
......
...@@ -35,11 +35,7 @@ ...@@ -35,11 +35,7 @@
{% if warnings is defined and warnings is not empty %} {% if warnings is defined and warnings is not empty %}
<h2>{{ '{core:frontpage:warnings}'|trans|escape('html') }}</h2> <h2>{{ '{core:frontpage:warnings}'|trans|escape('html') }}</h2>
{% for key, warning in warnings %} {% for key, warning in warnings %}
{% if warning is iterable %} <div class="caution">{{ warning|raw }}</div>
<div class="caution">{{ warning[0]|trans(warning[1], "app")|raw }}</div>
{% else %}
<div class="caution">{{ warning|trans|raw }}</div>
{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
......
...@@ -164,6 +164,14 @@ $t->data['pageid'] = 'frontpage_config'; ...@@ -164,6 +164,14 @@ $t->data['pageid'] = 'frontpage_config';
$t->data['header'] = $translator->t('{core:frontpage:page_title}'); $t->data['header'] = $translator->t('{core:frontpage:page_title}');
$t->data['isadmin'] = $isadmin; $t->data['isadmin'] = $isadmin;
$t->data['loginurl'] = $loginurl; $t->data['loginurl'] = $loginurl;
foreach ($warnings as &$warning) {
if (is_array($warning)) {
$warning = $translator->t($warning[0], $warning[1]);
} else {
$warning = $translator->t($warning);
}
}
$t->data['warnings'] = $warnings; $t->data['warnings'] = $warnings;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment