Skip to content

Commit cab879d

Browse files
committed
Start using the new attribute translations
1 parent 977940e commit cab879d

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

modules/core/lib/Controller.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public function account($as)
8484
$attributes = $auth->getAttributes();
8585

8686
$t = new Template($this->config, 'auth_status.twig', 'attributes');
87+
$l = $t->getLocalization();
88+
$l->addDomain($l->getLocaleDir(), 'attributes');
8789
$t->data['header'] = '{status:header_saml20_sp}';
8890
$t->data['attributes'] = $attributes;
8991
$t->data['nameid'] = !is_null($auth->getAuthData('saml:sp:NameID'))

templates/auth_status.twig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
{% embed '_table.twig' -%}
1818

1919
{% block namecol -%}
20-
{% set attr = ('{attributes:attribute_'~(name|lower)~'}') %}
21-
{% set translated = attr|trans %}
22-
<td class="attrname">{% if translated != attr %} {{ translated }} <br>{% endif %} <samp>{{ name }}</samp></td>
20+
{% set translated = name|trans %}
21+
<td class="attrname">{% if translated != name %} {{ translated }} <br>{% endif %} <samp>{{ name }}</samp></td>
2322
{% endblock %}
2423

2524

0 commit comments

Comments
 (0)