Skip to content

Commit

Permalink
Namespace translation tags
Browse files Browse the repository at this point in the history
Note the tags 'spname' and spdescription' that cannot be namespaced because
their translations are loaded dynamically.

For #455 and #465
  • Loading branch information
hmpf committed Oct 28, 2016
1 parent c387d9f commit 235b6d8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modules/consentAdmin/templates/consentadmin.php
Expand Up @@ -51,22 +51,22 @@ function setConsentText(consentStatus, show_spid) {


<!-- <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>
<?php echo $this->t('consentadmin_description1') ?> </p>
<?php echo $this->t('{consentAdmin:consentadmin:consentadmin_description1}') ?> </p>


<table>
<tr>
<th width="80%"><?php echo $this->t('service_provider_header') ?></th>
<th width="140"><?php echo $this->t('status_header') ?></th>
<th width="80%"><?php echo $this->t('{consentAdmin:consentadmin:service_provider_header}') ?></th>
<th width="140"><?php echo $this->t('{consentAdmin:consentadmin:status_header}') ?></th>
</tr>
<?php
$spList = $this->data['spList'];
$show_spid = 0;
$show_text = $this->t('show');
$hide_text = $this->t('hide');
$attributes_text = $this->t('attributes_text');
$show_text = $this->t('{consentAdmin:consentadmin:show}');
$hide_text = $this->t('{consentAdmin:consentadmin:hide}');
$attributes_text = $this->t('{consentAdmin:consentadmin:attributes_text}');
foreach ($spList AS $spName => $spValues) {
$this->getTranslator()->includeInlineTranslation('spname', $spValues['name']);
$this->getTranslator()->includeInlineTranslation('spdescription', $spValues['description']);
Expand All @@ -89,7 +89,7 @@ function setConsentText(consentStatus, show_spid) {
TRSTART;
$attributes = $spValues['attributes_by_sp'];
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";
foreach ($attributes AS $name => $value) {
Expand Down Expand Up @@ -123,7 +123,7 @@ function setConsentText(consentStatus, show_spid) {
</table>

<p>
<?php echo $this->t('consentadmin_description2') ?> </p>
<?php echo $this->t('{consentAdmin:consentadmin:consentadmin_description2}') ?> </p>

<h2>Logout</h2>

Expand Down

0 comments on commit 235b6d8

Please sign in to comment.