summaryrefslogtreecommitdiff
path: root/plugins/CasAuthentication
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CasAuthentication')
-rw-r--r--plugins/CasAuthentication/CasAuthenticationPlugin.php22
-rw-r--r--plugins/CasAuthentication/caslogin.php5
-rw-r--r--plugins/CasAuthentication/locale/CasAuthentication.pot41
3 files changed, 51 insertions, 17 deletions
diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php
index 1662db3eb..6b751a0aa 100644
--- a/plugins/CasAuthentication/CasAuthenticationPlugin.php
+++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php
@@ -79,8 +79,10 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
$action_name = $action->trimmed('action');
$action->menuItem(common_local_url('caslogin'),
+ // TRANS: Menu item. CAS is Central Authentication Service.
_m('CAS'),
- _m('Login or register with CAS'),
+ // TRANS: Tooltip for menu item. CAS is Central Authentication Service.
+ _m('Login or register with CAS.'),
$action_name === 'caslogin');
return true;
@@ -93,9 +95,11 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
switch ($name)
{
case 'login':
- $instr = '(Have an account with CAS? ' .
- 'Try our [CAS login]'.
- '(%%action.caslogin%%)!)';
+ // TRANS: Invitation to users with a CAS account to log in using the service.
+ // TRANS: "[CAS login]" is a link description. (%%action.caslogin%%) is the URL.
+ // TRANS: These two elements may not be separated.
+ $instr = _m('(Have an account with CAS? ' .
+ 'Try our [CAS login](%%action.caslogin%%)!)');
break;
default:
return true;
@@ -121,13 +125,13 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
function onInitializePlugin(){
parent::onInitializePlugin();
if(!isset($this->server)){
- throw new Exception("must specify a server");
+ throw new Exception(_m("Specifying a server is required.");
}
if(!isset($this->port)){
- throw new Exception("must specify a port");
+ throw new Exception(_m("Specifying a port is required.");
}
if(!isset($this->path)){
- throw new Exception("must specify a path");
+ throw new Exception(_m("Specifying a path is required.");
}
//These values need to be accessible to a action object
//I can't think of any other way than global variables
@@ -146,8 +150,8 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
'version' => STATUSNET_VERSION,
'author' => 'Craig Andrews',
'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication',
- 'rawdescription' =>
- _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).'));
+ // TRANS: Plugin description. CAS is Central Authentication Service.
+ 'rawdescription' => _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).'));
return true;
}
}
diff --git a/plugins/CasAuthentication/caslogin.php b/plugins/CasAuthentication/caslogin.php
index a66774dc1..846774e7c 100644
--- a/plugins/CasAuthentication/caslogin.php
+++ b/plugins/CasAuthentication/caslogin.php
@@ -36,13 +36,13 @@ class CasloginAction extends Action
$casTempPassword = common_good_rand(16);
$user = common_check_user(phpCAS::getUser(), $casTempPassword);
if (!$user) {
- $this->serverError(_('Incorrect username or password.'));
+ $this->serverError(_m('Incorrect username or password.'));
return;
}
// success!
if (!common_set_user($user)) {
- $this->serverError(_('Error setting user. You are probably not authorized.'));
+ $this->serverError(_m('Error setting user. You are probably not authorized.'));
return;
}
@@ -69,7 +69,6 @@ class CasloginAction extends Action
}
common_redirect($url, 303);
-
}
}
}
diff --git a/plugins/CasAuthentication/locale/CasAuthentication.pot b/plugins/CasAuthentication/locale/CasAuthentication.pot
index b5c45eb68..203fd5ede 100644
--- a/plugins/CasAuthentication/locale/CasAuthentication.pot
+++ b/plugins/CasAuthentication/locale/CasAuthentication.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-14 22:56+0000\n"
+"POT-Creation-Date: 2010-09-18 22:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,15 +16,38 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: CasAuthenticationPlugin.php:82
+#. TRANS: Menu item. CAS is Central Authentication Service.
+#: CasAuthenticationPlugin.php:83
msgid "CAS"
msgstr ""
-#: CasAuthenticationPlugin.php:83
-msgid "Login or register with CAS"
+#. TRANS: Tooltip for menu item. CAS is Central Authentication Service.
+#: CasAuthenticationPlugin.php:85
+msgid "Login or register with CAS."
+msgstr ""
+
+#. TRANS: Invitation to users with a CAS account to log in using the service.
+#. TRANS: "[CAS login]" is a link description. (%%action.caslogin%%) is the URL.
+#. TRANS: These two elements may not be separated.
+#: CasAuthenticationPlugin.php:101
+#, php-format
+msgid "(Have an account with CAS? Try our [CAS login](%%action.caslogin%%)!)"
+msgstr ""
+
+#: CasAuthenticationPlugin.php:128
+msgid "Specifying a server is required."
+msgstr ""
+
+#: CasAuthenticationPlugin.php:131
+msgid "Specifying a port is required."
+msgstr ""
+
+#: CasAuthenticationPlugin.php:134
+msgid "Specifying a path is required."
msgstr ""
-#: CasAuthenticationPlugin.php:150
+#. TRANS: Plugin description. CAS is Central Authentication Service.
+#: CasAuthenticationPlugin.php:154
msgid ""
"The CAS Authentication plugin allows for StatusNet to handle authentication "
"through CAS (Central Authentication Service)."
@@ -33,3 +56,11 @@ msgstr ""
#: caslogin.php:28
msgid "Already logged in."
msgstr ""
+
+#: caslogin.php:39
+msgid "Incorrect username or password."
+msgstr ""
+
+#: caslogin.php:45
+msgid "Error setting user. You are probably not authorized."
+msgstr ""