diff --git a/modules/consentAdmin/templates/consentadmin.php b/modules/consentAdmin/templates/consentadmin.php index dfdeb7b760f9f6c814d4c46ba8f07d865a2336e5..94f827f146f815d1a2ff0f05aed842cb4998408d 100644 --- a/modules/consentAdmin/templates/consentadmin.php +++ b/modules/consentAdmin/templates/consentadmin.php @@ -23,14 +23,12 @@ $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']); if (!is_null($spValues['serviceurl'])) { - $htmlSpName = '<a href="'.$spValues['serviceurl'].'" style="color: black; font-weight: bold;">'.htmlspecialchars($this->t('spname', array(), false, true)).'</a>'; + $htmlSpName = '<a href="'.$spValues['serviceurl'].'" style="color: black; font-weight: bold;">'.htmlspecialchars($spValues['name']).'</a>'; } else { - $htmlSpName = htmlspecialchars($this->t('spname', array(), false, true)); + $htmlSpName = htmlspecialchars($spValues['name']); } - $spDescription = htmlspecialchars($this->t('spdescription', array(), false, true)); + $spDescription = htmlspecialchars($spValues['description']); $checkedAttr = $spValues['consentStatus'] == 'ok' ? 'checked="checked"' : ''; $consentValue = $spValues['consentValue']; $consentText = $spValues['consentStatus'] == 'changed' ? "attributes has changed" : ""; diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php index 57b22db43203ced353af576657ed0ebc46cae399..48921aa93cf150850fc0834c25fb10c9daac8473 100644 --- a/modules/consentAdmin/www/consentAdmin.php +++ b/modules/consentAdmin/www/consentAdmin.php @@ -268,6 +268,13 @@ foreach ($all_sp_metadata as $sp_entityid => $sp_values) { // Add a URL to the service if present in metadata $sp_service_url = isset($sp_metadata['ServiceURL']) ? $sp_metadata['ServiceURL'] : null; + // Translate SP name and description + $translator->includeInlineTranslation('spname', $sp_name); + $translator->includeInlineTranslation('spdescription', $sp_description); + + $sp_name = $translator->getPreferredTranslation($translator->getTag('spname')); + $sp_description = $translator->getPreferredTranslation($translator->getTag('spdescription')); + // Fill out array for the template $sp_list[$sp_entityid] = array( 'spentityid' => $sp_entityid,