Skip to content
Snippets Groups Projects
Commit 24821ae6 authored by Olav Morken's avatar Olav Morken
Browse files

Made the OpenID templates translateable.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@763 44740490-163a-0410-bde0-09ae8108e29a
parent ce08a088
No related branches found
No related tags found
No related merge requests found
<?php
$lang = array(
'list_trusted_sites' => array (
'en' => 'List of trusted sites',
),
'about_link' => array (
'en' => 'About simpleSAMLphp OpenID',
),
'welcome' => array (
'en' => 'Welcome to the simpleSAMLphp OpenID provider.',
),
'howtouse' => array (
'en' => 'To use this server, you will have to set up a URL to use as an identifier. Insert the following markup into the <code>&lt;head&gt;</code> of the HTML document at that URL:',
),
'loggedinas' => array (
'en' => 'You are now logged in as %USERID%',
),
'login' => array (
'en' => 'Login',
),
'howtouse_cont' => array (
'en' => 'Then configure this server so that you can log in with that URL. Once you have configured the server, and marked up your identity URL, you can verify that it is working by using the %SITE% %TOOL%:',
),
'checkup_tool' => array (
'en' => 'OpenID Checkup tool',
),
'openid_url' => array (
'en' => 'OpenID URL:',
),
'check' => array (
'en' => 'Check',
),
'confirm_question' => array (
'en' => 'Do you wish to confirm your identity URL (%OPENIDURL%) with %SITEURL%?',
),
'remember' => array (
'en' => 'Remember this decision',
),
'confirm' => array (
'en' => 'Confirm',
),
'notconfirm' => array (
'en' => 'Do not confirm',
),
'trustlist_desc' => array (
'en' => 'These decisions have been remembered for this session. All decisions will be forgotten when the session ends.',
),
'trustlist_trustedsites' => array (
'en' => 'Trusted Sites',
),
'trustlist_untrustedsites' => array (
'en' => 'Untrusted Sites',
),
'trustlist_remove' => array (
'en' => 'Remove Selected',
),
'trustlist_refresh' => array (
'en' => 'Refresh List',
),
'trustlist_forget' => array (
'en' => 'Forget All',
),
'trustlist_nosites' => array (
'en' => 'No sites are remembered for this session. When you authenticate with a site, you can choose to add it to this list by choosing <q>Remember this decision</q>.',
),
);
?>
\ No newline at end of file
<?php $this->includeAtTemplateBase('includes/header.php'); ?> <?php
if (isset($this->data['header']) && $this->getTag($this->data['header']) !== NULL) {
$this->data['header'] = $this->t($this->data['header']);
}
$this->includeAtTemplateBase('includes/header.php');
?>
<div id="content"> <div id="content">
<?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?>
<p>[ <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/sites">List of trusted sites</a> | <p>[ <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/sites"><?php echo($this->t('{openid:list_trusted_sites}')); ?></a> |
About simpleSAMLphp OpenID ]</p> <?php echo($this->t('{openid:about_link}')); ?> ]</p>
<p>Welcome to the simpleSAMLphp OpenID provider.</p> <p><?php echo($this->t('{openid:welcome}')); ?></p>
<p> <p><?php echo($this->t('{openid:howtouse}')); ?></p>
To use this server, you will have to set up a URL to use as an identifier.
Insert the following markup into the <code>&lt;head&gt;</code> of the HTML
document at that URL:
</p>
<pre>&lt;link rel="openid.server" href="<?php echo htmlspecialchars($this->data['openidserver']); ?>" /&gt; <pre>&lt;link rel="openid.server" href="<?php echo htmlspecialchars($this->data['openidserver']); ?>" /&gt;
&lt;link rel="openid.delegation" href="<?php echo htmlspecialchars($this->data['openiddelegation']); ?>" /&gt; &lt;link rel="openid.delegation" href="<?php echo htmlspecialchars($this->data['openiddelegation']); ?>" /&gt;
...@@ -26,31 +28,32 @@ ...@@ -26,31 +28,32 @@
<p><?php <p><?php
if (isset($this->data['userid'])) { if (isset($this->data['userid'])) {
echo 'You are now logged in as ' . htmlspecialchars($this->data['userid']); echo($this->t('{openid:loggedinas}', array('%USERID%' => htmlspecialchars($this->data['userid']))));
} else { } else {
echo '<a href="' . htmlspecialchars($this->data['initssourl']) . '">Login</a>'; echo('<a href="' . htmlspecialchars($this->data['initssourl']) . '">' . $this->t('{openid:login}') . '</a>');
} }
?> ?>
<p> <p>
Then configure this server so that you can log in with that URL. Once you <?php
have configured the server, and marked up your identity URL, you can verify $param = array(
that it is working by using the <a href="http://www.openidenabled.com/" '%SITE%' => '<a href="http://www.openidenabled.com/">openidenabled.com</a>',
>openidenabled.com</a> '%TOOL%' => '<a href="http://www.openidenabled.com/resources/openid-test/checkup">' . $this->t('{openid:checkup_tool}') . '</a>',
<a href="http://www.openidenabled.com/resources/openid-test/checkup">OpenID Checkup tool</a>: );
echo($this->t('{openid:howtouse_cont}', $param));
?>
<form method="post" <form method="post"
action="http://www.openidenabled.com/resources/openid-test/checkup/start"> action="http://www.openidenabled.com/resources/openid-test/checkup/start">
<label for="checkup">OpenID URL: <label for="checkup"><?php echo($this->t('{openid:openid_url}')); ?>
</label><input id="checkup" type="text" name="openid_url" /> </label><input id="checkup" type="text" name="openid_url" />
<input type="submit" value="Check" /> <input type="submit" value="<?php echo($this->t('{openid:check}')); ?>" />
</form> </form>
</p> </p>
<h2>About simpleSAMLphp</h2> <h2><?php echo $this->t('{frontpage:about_header}'); ?></h2>
<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it? <p><?php echo $this->t('{frontpage:about_text}'); ?></p>
You can find more information about simpleSAMLphp at <a href="http://rnd.feide.no">the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?> <?php $this->includeAtTemplateBase('includes/footer.php'); ?>
<?php $this->includeAtTemplateBase('includes/header.php'); ?> <?php
if (isset($this->data['header']) && $this->getTag($this->data['header']) !== NULL) {
$this->data['header'] = $this->t($this->data['header']);
}
$this->includeAtTemplateBase('includes/header.php');
?>
<div id="content"> <div id="content">
...@@ -6,11 +12,11 @@ ...@@ -6,11 +12,11 @@
<?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?>
<p>[ List of trusted sites | <p>[ <?php echo($this->t('{openid:list_trusted_sites}')); ?> |
<a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/about">About simpleSAMLphp OpenID</a> ]</p> <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/about"><?php echo($this->t('{openid:about_link}')); ?></a> ]</p>
<p>These decisions have been remembered for this session. All decisions will be forgotten when the session ends.</p> <p><?php echo($this->t('{openid:trustlist_desc}')); ?></p>
<?php if (isset($this->data['sites'])) { ?> <?php if (isset($this->data['sites'])) { ?>
...@@ -32,8 +38,8 @@ ...@@ -32,8 +38,8 @@
} }
$i = 0; $i = 0;
foreach (array('Trusted Sites' => $trusted_sites, foreach (array($this->t('{openid:trustlist_trustedsites}') => $trusted_sites,
'Untrusted Sites' => $untrusted_sites) as $this->t('{openid:trustlist_untrustedsites}') => $untrusted_sites) as
$name => $sites) { $name => $sites) {
if ($sites) { if ($sites) {
echo '<tr><th colspan="2">'. htmlspecialchars($name) . '</th></tr>'; echo '<tr><th colspan="2">'. htmlspecialchars($name) . '</th></tr>';
...@@ -53,25 +59,21 @@ ...@@ -53,25 +59,21 @@
?> ?>
</tbody> </tbody>
</table> </table>
<input type="submit" name="remove" value="Remove Selected" /> <input type="submit" name="remove" value="<?php echo($this->t('{openid:trustlist_remove}')); ?>" />
<input type="submit" name="refresh" value="Refresh List" /> <input type="submit" name="refresh" value="<?php echo($this->t('{openid:trustlist_refresh}')); ?>" />
<input type="submit" name="forget" value="Forget All" /> <input type="submit" name="forget" value="<?php echo($this->t('{openid:trustlist_forget}')); ?>" />
</form> </form>
</div> </div>
<?php } else { ?> <?php } else { ?>
<p>No sites are remembered for this session. When you authenticate with a site, <p><?php echo($this->t('{openid:trustlist_nosites}')); ?></p>
you can choose to add it to this list by choosing <q>Remember this decision</q>.
</p>
<?php } ?> <?php } ?>
<h2>About simpleSAMLphp</h2> <h2><?php echo $this->t('{frontpage:about_header}'); ?></h2>
<p><?php echo $this->t('{frontpage:about_text}'); ?></p>
<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it?
You can find more information about simpleSAMLphp at <a href="http://rnd.feide.no">the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?> <?php $this->includeAtTemplateBase('includes/footer.php'); ?>
<?php $this->includeAtTemplateBase('includes/header.php'); ?> <?php
if (isset($this->data['header']) && $this->getTag($this->data['header']) !== NULL) {
$this->data['header'] = $this->t($this->data['header']);
}
$this->includeAtTemplateBase('includes/header.php');
?>
<div id="content"> <div id="content">
...@@ -6,24 +12,28 @@ ...@@ -6,24 +12,28 @@
<?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?>
<p>[ <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/sites">List of trusted sites</a> | <p>[ <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/sites"><?php echo($this->t('{openid:list_trusted_sites}')); ?></a> |
<a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/about">About simpleSAMLphp OpenID</a> ]</p> <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/about"><?php echo($this->t('{openid:about_link}')); ?></a> ]</p>
<div class="form"> <div class="form">
<p>Do you wish to confirm your identity URL (<code><?php echo htmlspecialchars($this->data['openidurl']); ?></code>) <?php
with <code><?php echo $this->data['siteurl']; ?></code>?</p> $params = array(
'%OPENIDURL%' => '<code>' . htmlspecialchars($this->data['openidurl']) . '</code>',
'%SITEURL%' => '<code>' . $this->data['siteurl'] . '</code>',
);
echo('<p>' . $this->t('{openid:confirm_question}', $params) . '</p>');
?>
<form method="post" action="<?php echo $this->data['trusturl']; ?>"> <form method="post" action="<?php echo $this->data['trusturl']; ?>">
<input type="checkbox" name="remember" value="on" id="remember"><label <input type="checkbox" name="remember" value="on" id="remember"><label
for="remember">Remember this decision</label> for="remember"><?php echo($this->t('{openid:remember}')); ?></label>
<br /> <br />
<input type="submit" name="trust" value="Confirm" /> <input type="submit" name="trust" value="<?php echo($this->t('{openid:confirm}')); ?>" />
<input type="submit" value="Do not confirm" /> <input type="submit" value="<?php echo($this->t('{openid:notconfirm}')); ?>" />
</form> </form>
</div> </div>
<h2>About simpleSAMLphp</h2> <h2><?php echo $this->t('{frontpage:about_header}'); ?></h2>
<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it? <p><?php echo $this->t('{frontpage:about_text}'); ?></p>
You can find more information about simpleSAMLphp at <a href="http://rnd.feide.no">the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?> <?php $this->includeAtTemplateBase('includes/footer.php'); ?>
\ No newline at end of file
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