summaryrefslogtreecommitdiff
path: root/plugins/OpenID/openid.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OpenID/openid.php')
-rw-r--r--plugins/OpenID/openid.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php
index 4ec336e1c..68b5c29e2 100644
--- a/plugins/OpenID/openid.php
+++ b/plugins/OpenID/openid.php
@@ -134,6 +134,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
$consumer = oid_consumer();
if (!$consumer) {
+ // TRANS: OpenID plugin server error.
common_server_error(_m('Cannot instantiate OpenID consumer object.'));
return false;
}
@@ -144,8 +145,11 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
// Handle failure status return values.
if (!$auth_request) {
+ // TRANS: OpenID plugin message. Given when an OpenID is not valid.
return _m('Not a valid OpenID.');
} else if (Auth_OpenID::isFailure($auth_request)) {
+ // TRANS: OpenID plugin server error. Given when the OpenID authentication request fails.
+ // TRANS: %s is the failure message.
return sprintf(_m('OpenID failure: %s'), $auth_request->message);
}
@@ -173,6 +177,8 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
$immediate);
if (!$redirect_url) {
} else if (Auth_OpenID::isFailure($redirect_url)) {
+ // TRANS: OpenID plugin server error. Given when the OpenID authentication request cannot be redirected.
+ // TRANS: %s is the failure message.
return sprintf(_m('Could not redirect to server: %s'), $redirect_url->message);
} else {
common_redirect($redirect_url, 303);
@@ -191,6 +197,8 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
// Display an error if the form markup couldn't be generated;
// otherwise, render the HTML.
if (Auth_OpenID::isFailure($form_html)) {
+ // TRANS: OpenID plugin server error if the form markup could not be generated.
+ // TRANS: %s is the failure message.
common_server_error(sprintf(_m('Could not create OpenID form: %s'), $form_html->message));
} else {
$action = new AutosubmitAction(); // see below
@@ -207,6 +215,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
function _oid_print_instructions()
{
common_element('div', 'instructions',
+ // TRANS: OpenID plugin user instructions.
_m('This form should automatically submit itself. '.
'If not, click the submit button to go to your '.
'OpenID provider.'));
@@ -239,6 +248,7 @@ function oid_update_user(&$user, &$sreg)
# XXX save timezone if it's passed
if (!$profile->update($orig_profile)) {
+ // TRANS: OpenID plugin server error.
common_server_error(_m('Error saving the profile.'));
return false;
}
@@ -250,6 +260,7 @@ function oid_update_user(&$user, &$sreg)
}
if (!$user->update($orig_user)) {
+ // TRANS: OpenID plugin server error.
common_server_error(_m('Error saving the user.'));
return false;
}
@@ -279,6 +290,7 @@ function oid_assert_allowed($url)
return;
}
}
+ // TRANS: OpenID plugin client exception (403).
throw new ClientException(_m("Unauthorized URL used for OpenID login."), 403);
}
}
@@ -299,6 +311,7 @@ class AutosubmitAction extends Action
function title()
{
+ // TRANS: Title
return _m('OpenID Login Submission');
}
@@ -309,9 +322,11 @@ class AutosubmitAction extends Action
$this->element('img', array('src' => Theme::path('images/icons/icon_processing.gif', 'base'),
// for some reason the base CSS sets <img>s as block display?!
'style' => 'display: inline'));
+ // TRANS: OpenID plugin message used while requesting authorization user's OpenID login provider.
$this->text(_m('Requesting authorization from your login provider...'));
$this->raw('</p>');
$this->raw('<p style="margin-top: 60px; font-style: italic">');
+ // TRANS: OpenID plugin message. User instruction while requesting authorization user's OpenID login provider.
$this->text(_m('If you are not redirected to your login provider in a few seconds, try pushing the button below.'));
$this->raw('</p>');
$this->raw($this->form_html);