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

Remove deprecated use of translations

parent 8d181c0a
No related branches found
No related tags found
No related merge requests found
......@@ -67,11 +67,7 @@ if ($this->data['isadmin']) {
echo '<h2>' . $this->t('{core:frontpage:warnings}') . '</h2>';
foreach($this->data['warnings'] AS $warning) {
if (is_array($warning)) {
echo '<div class="caution">' . $this->t($warning[0], $warning[1]) . '</div>';
} else {
echo '<div class="caution">'.$this->t($warning).'</div>';
}
echo '<div class="caution">'.$warning.'</div>';
}
}
?>
......
......@@ -35,11 +35,7 @@
{% if warnings is defined and warnings is not empty %}
<h2>{{ '{core:frontpage:warnings}'|trans|escape('html') }}</h2>
{% for key, warning in warnings %}
{% if warning is iterable %}
<div class="caution">{{ warning[0]|trans(warning[1], "app")|raw }}</div>
{% else %}
<div class="caution">{{ warning|trans|raw }}</div>
{% endif %}
<div class="caution">{{ warning|raw }}</div>
{% endfor %}
{% endif %}
......
......@@ -164,6 +164,14 @@ $t->data['pageid'] = 'frontpage_config';
$t->data['header'] = $translator->t('{core:frontpage:page_title}');
$t->data['isadmin'] = $isadmin;
$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;
......
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