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

Make login-feide translateable.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@765 44740490-163a-0410-bde0-09ae8108e29a
parent 0bd2550e
No related branches found
No related tags found
No related merge requests found
...@@ -182,6 +182,30 @@ $lang = array( ...@@ -182,6 +182,30 @@ $lang = array(
'hr' => 'Neispravna korisnička oznaka ili zaporka.', 'hr' => 'Neispravna korisnička oznaka ili zaporka.',
'hu' => 'Hibás felhasználói név vagy jelszó!', 'hu' => 'Hibás felhasználói név vagy jelszó!',
), ),
'select_home_org' => array (
'en' => 'Choose your home organization',
),
'next' => array (
'en' => 'Next',
),
'change_home_org_title' => array (
'en' => 'Change your home organization',
),
'change_home_org_text' => array (
'en' => 'You have chosen <b>%HOMEORG%</b> as your home organization. If this is wrong you may choose another one.',
),
'change_home_org_button' => array (
'en' => 'Choose home organization',
),
'help_desk_link' => array (
'en' => 'Help desk homepage',
),
'help_desk_email' => array (
'en' => 'Send e-mail to help desk',
),
'contact_info' => array (
'en' => 'Contact information:',
),
); );
......
<?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'); $this->includeAtTemplateBase('includes/header.php');
...@@ -6,9 +9,18 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -6,9 +9,18 @@ $this->includeAtTemplateBase('includes/header.php');
<?php if (isset($this->data['error'])) { ?> <?php if (isset($this->data['error'])) { ?>
<div id="errorframe"> <div id="errorframe">
<h2>What you entered was not accepted!</h2> <h2><?php echo $this->t('{login:error_header}'); ?></h2>
<p><?php echo htmlspecialchars($this->data['error']); ?> </p>
<?php
echo('<p>');
if($this->getTag($this->data['error']) !== NULL) {
echo $this->t($this->data['error']);
} else {
echo(htmlspecialchars($this->data['error']));
}
echo('</p>');
?>
</div> </div>
<?php } ?> <?php } ?>
...@@ -16,7 +28,7 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -16,7 +28,7 @@ $this->includeAtTemplateBase('includes/header.php');
<div id="orgframe"> <div id="orgframe">
<form action="?" method="get" name="f"> <form action="?" method="get" name="f">
<fieldset> <fieldset>
<legend>Choose your home organization</legend> <legend><?php echo($this->t('{login:select_home_org}')); ?></legend>
<select name="org" tabindex="1"> <select name="org" tabindex="1">
<?php <?php
foreach ($this->data['allowedorgs'] AS $key) { foreach ($this->data['allowedorgs'] AS $key) {
...@@ -30,7 +42,7 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -30,7 +42,7 @@ $this->includeAtTemplateBase('includes/header.php');
<input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" /> <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
<input type="hidden" name="protocol" value="<?php echo htmlspecialchars($this->data['protocol']); ?>" /> <input type="hidden" name="protocol" value="<?php echo htmlspecialchars($this->data['protocol']); ?>" />
<input type="hidden" name="AuthId" value="<?php echo htmlspecialchars($this->data['authid']); ?>" /> <input type="hidden" name="AuthId" value="<?php echo htmlspecialchars($this->data['authid']); ?>" />
<input type="submit" id="submit" value="Next" /> <input type="submit" id="submit" value="<?php echo($this->t('{login:next}')); ?>" />
</fieldset> </fieldset>
</form> </form>
</div> </div>
...@@ -40,24 +52,23 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -40,24 +52,23 @@ $this->includeAtTemplateBase('includes/header.php');
<div id="inputframe"> <div id="inputframe">
<form action="?" method="post" name="f"> <form action="?" method="post" name="f">
<fieldset> <fieldset>
<legend>Enter your username and password</legend> <legend><?php echo $this->t('{login:user_pass_header}'); ?></legend>
<p>A service has requested you to authenticate your self. <p><?php echo $this->t('{login:user_pass_text}'); ?></p>
That means you need to enter your username and password in the form below.</p> <label for="username" accesskey="u" tabindex="1"><?php echo($this->t('{login:username}')); ?></label>
<label for="username" accesskey="u" tabindex="1">Username: </label>
<input type="text" id="username" name="username" <input type="text" id="username" name="username"
<?php if (isset($this->data['username'])) { <?php if (isset($this->data['username'])) {
echo 'value="' . htmlspecialchars($this->data['username']) . '"'; echo 'value="' . htmlspecialchars($this->data['username']) . '"';
} ?> } ?>
/> @ <?php echo $this->data['org']; ?><br /> /> @ <?php echo $this->data['org']; ?><br />
<label for="password" accesskey="p" tabindex="2">Password: </label> <label for="password" accesskey="p" tabindex="2"><?php echo($this->t('{login:password}')); ?></label>
<input type="password" id="password" name="password" /><br /> <input type="password" id="password" name="password" /><br />
<input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" /> <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
<input type="hidden" name="protocol" value="<?php echo htmlspecialchars($this->data['protocol']); ?>" /> <input type="hidden" name="protocol" value="<?php echo htmlspecialchars($this->data['protocol']); ?>" />
<input type="hidden" name="AuthId" value="<?php echo htmlspecialchars($this->data['authid']); ?>" /> <input type="hidden" name="AuthId" value="<?php echo htmlspecialchars($this->data['authid']); ?>" />
<input type="hidden" name="org" value="<?php echo $this->data['org']; ?>" /> <input type="hidden" name="org" value="<?php echo $this->data['org']; ?>" />
<input type="submit" id="submit" value="Login" /> <input type="submit" id="submit" value="<?php echo($this->t('{login:login_button}')); ?>" />
</fieldset> </fieldset>
</form> </form>
</div> </div>
...@@ -65,21 +76,20 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -65,21 +76,20 @@ $this->includeAtTemplateBase('includes/header.php');
<div id="rechooseorgframe"> <div id="rechooseorgframe">
<form action="?" method="get" name="g"> <form action="?" method="get" name="g">
<fieldset> <fieldset>
<legend>Change your home organization</legend> <legend><?php echo($this->t('{login:change_home_org_title}')); ?></legend>
<p>You have chosen <b><?php echo $this->data['ldapconfig'][$this->data['org']]['description']; ?></b> as your home organization. If this is wrong you may choose <p><?php echo($this->t('{login:change_home_org_text}', array('%HOMEORG%' => $this->data['ldapconfig'][$this->data['org']]['description']))); ?></p>
another one.</p>
<input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" /> <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
<input type="hidden" name="protocol" value="<?php echo htmlspecialchars($this->data['protocol']); ?>" /> <input type="hidden" name="protocol" value="<?php echo htmlspecialchars($this->data['protocol']); ?>" />
<input type="hidden" name="AuthId" value="<?php echo htmlspecialchars($this->data['authid']); ?>" /> <input type="hidden" name="AuthId" value="<?php echo htmlspecialchars($this->data['authid']); ?>" />
<input type="hidden" name="action" value="change_org" /> <input type="hidden" name="action" value="change_org" />
<input type="submit" id="submit" value="Choose home organization" /> <input type="submit" id="submit" value="<?php echo($this->t('{login:change_home_org_button}')); ?>" />
</fieldset> </fieldset>
</form> </form>
</div> </div>
<div id="helpframe"> <div id="helpframe">
<h3>Help! I don't remember my password.</h3> <h3><?php echo($this->t('{login:help_header}')); ?></h3>
<p>Too bad! - Without your username and password you cannot authenticate your self and access the service.</p> <p><?php echo($this->t('{login:help_text}')); ?></p>
<?php <?php
$listitems = array(); $listitems = array();
...@@ -87,14 +97,14 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -87,14 +97,14 @@ $this->includeAtTemplateBase('includes/header.php');
if (isset($this->data['ldapconfig'][$this->data['org']]['contactURL'])) { if (isset($this->data['ldapconfig'][$this->data['org']]['contactURL'])) {
$listitems[] = '<li><a href="' . $this->data['ldapconfig'][$this->data['org']]['contactURL'] . '">Help desk homepage</a></li>'; $listitems[] = '<li><a href="' . $this->data['ldapconfig'][$this->data['org']]['contactURL'] . '">' . $this->t('{login:help_desk_link}') . '</a></li>';
} }
if (isset($this->data['ldapconfig'][$this->data['org']]['contactMail'])) { if (isset($this->data['ldapconfig'][$this->data['org']]['contactMail'])) {
$listitems[] = '<li><a href="mailto:' . $this->data['ldapconfig'][$this->data['org']]['contactMail'] . '">Send e-mail to help desk</a></li>'; $listitems[] = '<li><a href="mailto:' . $this->data['ldapconfig'][$this->data['org']]['contactMail'] . '">' . $this->t('{login:help_desk_email}') . '</a></li>';
} }
if ($listitems) { if ($listitems) {
echo '<p>Contact information:</p><ul>' . join("\n", $listitems) . '</ul>'; echo '<p>' . $this->t('{login:contact_info}') . '</p><ul>' . join("\n", $listitems) . '</ul>';
} }
?> ?>
......
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