diff --git a/dictionaries/openid.php b/dictionaries/openid.php new file mode 100644 index 0000000000000000000000000000000000000000..0b9b7af9502feeb7dc3407bb9536e386b94d9c02 --- /dev/null +++ b/dictionaries/openid.php @@ -0,0 +1,71 @@ +<?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><head></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 diff --git a/templates/default/openid-about.php b/templates/default/openid-about.php index c1bd39aa2ea6ae21ead142f95f7321debb6d85dc..424856899a83eeedd96bb5c189ee7aaea570ffe5 100644 --- a/templates/default/openid-about.php +++ b/templates/default/openid-about.php @@ -1,22 +1,24 @@ -<?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"> <?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> | - About simpleSAMLphp OpenID ]</p> + <p>[ <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/sites"><?php echo($this->t('{openid:list_trusted_sites}')); ?></a> | + <?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> - To use this server, you will have to set up a URL to use as an identifier. - Insert the following markup into the <code><head></code> of the HTML - document at that URL: - </p> + <p><?php echo($this->t('{openid:howtouse}')); ?></p> <pre><link rel="openid.server" href="<?php echo htmlspecialchars($this->data['openidserver']); ?>" /> <link rel="openid.delegation" href="<?php echo htmlspecialchars($this->data['openiddelegation']); ?>" /> @@ -26,31 +28,32 @@ <p><?php 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 { - echo '<a href="' . htmlspecialchars($this->data['initssourl']) . '">Login</a>'; + echo('<a href="' . htmlspecialchars($this->data['initssourl']) . '">' . $this->t('{openid:login}') . '</a>'); } ?> <p> - 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 <a href="http://www.openidenabled.com/" - >openidenabled.com</a> - <a href="http://www.openidenabled.com/resources/openid-test/checkup">OpenID Checkup tool</a>: +<?php +$param = array( + '%SITE%' => '<a href="http://www.openidenabled.com/">openidenabled.com</a>', + '%TOOL%' => '<a href="http://www.openidenabled.com/resources/openid-test/checkup">' . $this->t('{openid:checkup_tool}') . '</a>', + ); +echo($this->t('{openid:howtouse_cont}', $param)); +?> <form method="post" 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" /> - <input type="submit" value="Check" /> + <input type="submit" value="<?php echo($this->t('{openid:check}')); ?>" /> </form> </p> - <h2>About simpleSAMLphp</h2> - <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> + <h2><?php echo $this->t('{frontpage:about_header}'); ?></h2> + <p><?php echo $this->t('{frontpage:about_text}'); ?></p> <?php $this->includeAtTemplateBase('includes/footer.php'); ?> diff --git a/templates/default/openid-sites.php b/templates/default/openid-sites.php index a08cd7fe22eb9f190753a9bccd689a7050bf8226..e1b6e88fb7b381e631e1024faa435e660b1f5063 100644 --- a/templates/default/openid-sites.php +++ b/templates/default/openid-sites.php @@ -1,4 +1,10 @@ -<?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"> @@ -6,11 +12,11 @@ <?php if (isset($this->data['header'])) { echo '<h2>' . $this->data['header'] . '</h2>'; } ?> - <p>[ List of trusted sites | - <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/about">About simpleSAMLphp OpenID</a> ]</p> + <p>[ <?php echo($this->t('{openid:list_trusted_sites}')); ?> | + <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'])) { ?> @@ -32,8 +38,8 @@ } $i = 0; - foreach (array('Trusted Sites' => $trusted_sites, - 'Untrusted Sites' => $untrusted_sites) as + foreach (array($this->t('{openid:trustlist_trustedsites}') => $trusted_sites, + $this->t('{openid:trustlist_untrustedsites}') => $untrusted_sites) as $name => $sites) { if ($sites) { echo '<tr><th colspan="2">'. htmlspecialchars($name) . '</th></tr>'; @@ -53,25 +59,21 @@ ?> </tbody> </table> - <input type="submit" name="remove" value="Remove Selected" /> - <input type="submit" name="refresh" value="Refresh List" /> - <input type="submit" name="forget" value="Forget All" /> + <input type="submit" name="remove" value="<?php echo($this->t('{openid:trustlist_remove}')); ?>" /> + <input type="submit" name="refresh" value="<?php echo($this->t('{openid:trustlist_refresh}')); ?>" /> + <input type="submit" name="forget" value="<?php echo($this->t('{openid:trustlist_forget}')); ?>" /> </form> </div> <?php } else { ?> - <p>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>. - </p> + <p><?php echo($this->t('{openid:trustlist_nosites}')); ?></p> <?php } ?> - <h2>About simpleSAMLphp</h2> - - <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> + <h2><?php echo $this->t('{frontpage:about_header}'); ?></h2> + <p><?php echo $this->t('{frontpage:about_text}'); ?></p> <?php $this->includeAtTemplateBase('includes/footer.php'); ?> diff --git a/templates/default/openid-trust.php b/templates/default/openid-trust.php index 583416f0704a2d1158a82117b11343d76d8b1673..8ac1205e951c48cdc1849d7ec40f5730b5833eb2 100644 --- a/templates/default/openid-trust.php +++ b/templates/default/openid-trust.php @@ -1,4 +1,10 @@ -<?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"> @@ -6,24 +12,28 @@ <?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> | - <a href="/<?php echo $this->data['baseurlpath']; ?>/openid/provider/server.php/about">About simpleSAMLphp OpenID</a> ]</p> + <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"><?php echo($this->t('{openid:about_link}')); ?></a> ]</p> <div class="form"> - <p>Do you wish to confirm your identity URL (<code><?php echo htmlspecialchars($this->data['openidurl']); ?></code>) - with <code><?php echo $this->data['siteurl']; ?></code>?</p> +<?php +$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']; ?>"> <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 /> - <input type="submit" name="trust" value="Confirm" /> - <input type="submit" value="Do not confirm" /> + <input type="submit" name="trust" value="<?php echo($this->t('{openid:confirm}')); ?>" /> + <input type="submit" value="<?php echo($this->t('{openid:notconfirm}')); ?>" /> </form> </div> - <h2>About simpleSAMLphp</h2> - <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> + <h2><?php echo $this->t('{frontpage:about_header}'); ?></h2> + <p><?php echo $this->t('{frontpage:about_text}'); ?></p> <?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file