Skip to content
Snippets Groups Projects
Commit 235b6d85 authored by Hanne Moa's avatar Hanne Moa
Browse files

Namespace translation tags

Note the tags 'spname' and spdescription' that cannot be namespaced because
their translations are loaded dynamically.

For #455 and #465
parent c387d9fe
No related branches found
No related tags found
No related merge requests found
...@@ -51,22 +51,22 @@ span.showhide { ...@@ -51,22 +51,22 @@ span.showhide {
<!-- <h2><?php if (isset($this->data['header'])) { echo $this->t($this->data['header']); } else { echo "Some error occurred"; } ?></h2> --> <!-- <h2><?php if (isset($this->data['header'])) { echo $this->t($this->data['header']); } else { echo "Some error occurred"; } ?></h2> -->
<h2><?php echo $this->t('consentadmin_header') ?></h2> <h2><?php echo $this->t('{consentAdmin:consentadmin:consentadmin_header}') ?></h2>
<p> <p>
<?php echo $this->t('consentadmin_description1') ?> </p> <?php echo $this->t('{consentAdmin:consentadmin:consentadmin_description1}') ?> </p>
<table> <table>
<tr> <tr>
<th width="80%"><?php echo $this->t('service_provider_header') ?></th> <th width="80%"><?php echo $this->t('{consentAdmin:consentadmin:service_provider_header}') ?></th>
<th width="140"><?php echo $this->t('status_header') ?></th> <th width="140"><?php echo $this->t('{consentAdmin:consentadmin:status_header}') ?></th>
</tr> </tr>
<?php <?php
$spList = $this->data['spList']; $spList = $this->data['spList'];
$show_spid = 0; $show_spid = 0;
$show_text = $this->t('show'); $show_text = $this->t('{consentAdmin:consentadmin:show}');
$hide_text = $this->t('hide'); $hide_text = $this->t('{consentAdmin:consentadmin:hide}');
$attributes_text = $this->t('attributes_text'); $attributes_text = $this->t('{consentAdmin:consentadmin:attributes_text}');
foreach ($spList AS $spName => $spValues) { foreach ($spList AS $spName => $spValues) {
$this->getTranslator()->includeInlineTranslation('spname', $spValues['name']); $this->getTranslator()->includeInlineTranslation('spname', $spValues['name']);
$this->getTranslator()->includeInlineTranslation('spdescription', $spValues['description']); $this->getTranslator()->includeInlineTranslation('spdescription', $spValues['description']);
...@@ -89,7 +89,7 @@ span.showhide { ...@@ -89,7 +89,7 @@ span.showhide {
TRSTART; TRSTART;
$attributes = $spValues['attributes_by_sp']; $attributes = $spValues['attributes_by_sp'];
if ($this->data['showDescription']) { if ($this->data['showDescription']) {
echo '<p>' . $this->t('consentadmin_purpose') . ' ' . $spDescription . '</p>'; echo '<p>' . $this->t('{consentAdmin:consentadmin:consentadmin_purpose}') . ' ' . $spDescription . '</p>';
} }
echo "\n<ul>\n"; echo "\n<ul>\n";
foreach ($attributes AS $name => $value) { foreach ($attributes AS $name => $value) {
...@@ -123,7 +123,7 @@ TRSTART; ...@@ -123,7 +123,7 @@ TRSTART;
</table> </table>
<p> <p>
<?php echo $this->t('consentadmin_description2') ?> </p> <?php echo $this->t('{consentAdmin:consentadmin:consentadmin_description2}') ?> </p>
<h2>Logout</h2> <h2>Logout</h2>
......
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