Skip to content
Snippets Groups Projects
Commit 21e4d3aa authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Made consent module possible to translate.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@536 44740490-163a-0410-bde0-09ae8108e29a
parent 2149c8ca
No related branches found
No related tags found
No related merge requests found
<?php
// consentadmin dictionary
/*
'' => array(
'en' => '',
'no' => '',
'nn' => '',
'da' => '',
'es' => '',
'fr' => '',
'de' => '',
'nl' => '',
'lu' => '',
'sl' => '',
),
*
* */
$lang = array(
// WAYF: Additional attributes START
'attribute_org' => array(
'en' => 'Organisation',
'da' => 'Organisation',
),
'attribute_id' => array(
'en' => 'Id',
'da' => 'Id',
),
'attribute_injected' => array(
'en' => 'Injected attribute',
'da' => 'Injiceret attribut',
),
// WAYF: Additional attributes END
'yes' => array(
'en' => 'yes',
'no' => 'ja',
'nn' => 'ja',
'da' => 'ja',
// 'es' => '',
'fr' => 'oui',
'de' => 'ja',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'no' => array(
'en' => 'no',
'no' => 'nej',
'nn' => 'nej',
'da' => 'nej',
// 'es' => 'no',
'fr' => 'non',
'de' => 'nein',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'remember' => array(
'en' => 'remember consent',
'no' => 'husk samtykke',
//'nn' => '',
'da' => 'husk samtykke',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'consent_notice' => array(
'en' => 'You are about to login to the service',
'no' => 'Du er ved at logge på servicen',
// 'nn' => '',
'da' => 'Du er ved at logge ind på servicen',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'consent_accept' => array(
'en' => 'In the login proccess, the identity provider will send attributes containing information about your identity to this service. Do you accept this?',
// 'no' => '',
// 'nn' => '',
'da' => 'I login processen vil din Identity Provider sende attributter som indeholder oplysninger om din identitet til denne service. Vil du acceptere dette?',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'login' => array(
'en' => 'login',
// 'no' => '',
// 'nn' => '',
'da' => 'login',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'service_providers_for' => array(
'en' => 'Service Providers for',
'no' => 'Service Providers for',
'nn' => 'Service Providers for',
'da' => 'Service Providers for',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'service_provider_header' => array(
'en' => 'Service Provider',
'no' => 'Service Provider',
'nn' => 'Service Provider',
'da' => 'Service Provider',
'es' => 'Service Provider',
'fr' => 'Service Provider',
'de' => 'Service Provider',
'nl' => 'Service Provider',
'lu' => 'Service Provider',
'sl' => 'Service Provider',
),
'status_header' => array(
'en' => 'Consent status',
'no' => 'Samtykke status',
//'nn' => '',
'da' => 'Samtykke status',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
'show_hide_attributes' => array(
'en' => 'show/hide attributes',
'no' => 'vis/skjul attributter',
//'nn' => 'vis/skjul attributter',
'da' => 'vis/skjul attributter',
// 'es' => '',
// 'fr' => '',
// 'de' => '',
// 'nl' => '',
// 'lu' => '',
// 'sl' => '',
),
);
<?php $this->includeAtTemplateBase('includes/header.php'); ?>
<?php
//array('SP'=>
$this->includeLanguageFile('consent.php');
$this->includeInlineTranslation('spname', $this->data['sp_name']);
//$this->includeInlineTranslation('spdescription', $this->data['description']);
?>
<div id="content">
<p>You are about to login to the service <strong><?php echo htmlspecialchars($this->data['sp_name']); ?></strong>. In the login proccess, the identity provider will send attributes containing information about your identity to this service. Do you accept this?</p>
[default]
<p><?php echo htmlspecialchars($this->t('consent_notice')); ?> <strong><?php echo htmlspecialchars($this->t('spname', false, true) ); ?></strong>.
<?php echo htmlspecialchars($this->t('consent_accept')) ?>
</p>
<form action="<?php echo htmlspecialchars($this->data['consenturl']); ?>">
<input type="submit" value="Yes" />
<input type="submit" value="<?php echo htmlspecialchars($this->t('yes')) ?>" />
<input type="hidden" name="consent" value="<?php echo htmlspecialchars($this->data['consent_cookie']); ?>" />
<input type="hidden" name="RequestID" value="<?php echo htmlspecialchars($this->data['requestid']); ?>" />
<?php if($this->data['usestorage']) { ?>
<input type="checkbox" name="saveconsent" id="saveconsent" value="1" /> remember consent
<input type="checkbox" name="saveconsent" id="saveconsent" value="1" /> <?php echo htmlspecialchars($this->t('remember')) ?>
<?php } ?>
</form>
<form action="<?php echo htmlspecialchars($this->data['noconsent']); ?>" method="GET">
<input type="submit" value="No" />
<input type="submit" value="<?php echo htmlspecialchars($this->t('no')) ?>" />
</form>
......@@ -26,15 +30,13 @@
<table style="font-size: x-small">
<?php
$attributes = $this->data['attributes'];
foreach ($attributes AS $name => $value) {
if (isset($this->data['attribute_' . htmlspecialchars(strtolower($name)) ])) {
$name = $this->data['attribute_' . htmlspecialchars(strtolower($name))];
}
$name = $this->t('attribute_'.strtolower($name), true); // translate
if (sizeof($value) > 1) {
echo '<tr><td>' . htmlspecialchars($name) . '</td><td><ul>';
foreach ($value AS $v) {
......
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