forked from GNUsocial/gnu-social
Update i18n/L10n
This commit is contained in:
parent
f8e91ab33f
commit
03e600b797
@ -79,8 +79,10 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
$action_name = $action->trimmed('action');
|
$action_name = $action->trimmed('action');
|
||||||
|
|
||||||
$action->menuItem(common_local_url('caslogin'),
|
$action->menuItem(common_local_url('caslogin'),
|
||||||
|
// TRANS: Menu item. CAS is Central Authentication Service.
|
||||||
_m('CAS'),
|
_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');
|
$action_name === 'caslogin');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -93,9 +95,11 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
switch ($name)
|
switch ($name)
|
||||||
{
|
{
|
||||||
case 'login':
|
case 'login':
|
||||||
$instr = '(Have an account with CAS? ' .
|
// TRANS: Invitation to users with a CAS account to log in using the service.
|
||||||
'Try our [CAS login]'.
|
// TRANS: "[CAS login]" is a link description. (%%action.caslogin%%) is the URL.
|
||||||
'(%%action.caslogin%%)!)';
|
// TRANS: These two elements may not be separated.
|
||||||
|
$instr = _m('(Have an account with CAS? ' .
|
||||||
|
'Try our [CAS login](%%action.caslogin%%)!)');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
@ -121,13 +125,13 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
function onInitializePlugin(){
|
function onInitializePlugin(){
|
||||||
parent::onInitializePlugin();
|
parent::onInitializePlugin();
|
||||||
if(!isset($this->server)){
|
if(!isset($this->server)){
|
||||||
throw new Exception("must specify a server");
|
throw new Exception(_m("Specifying a server is required.");
|
||||||
}
|
}
|
||||||
if(!isset($this->port)){
|
if(!isset($this->port)){
|
||||||
throw new Exception("must specify a port");
|
throw new Exception(_m("Specifying a port is required.");
|
||||||
}
|
}
|
||||||
if(!isset($this->path)){
|
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
|
//These values need to be accessible to a action object
|
||||||
//I can't think of any other way than global variables
|
//I can't think of any other way than global variables
|
||||||
@ -146,8 +150,8 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
'version' => STATUSNET_VERSION,
|
'version' => STATUSNET_VERSION,
|
||||||
'author' => 'Craig Andrews',
|
'author' => 'Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication',
|
'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication',
|
||||||
'rawdescription' =>
|
// TRANS: Plugin description. CAS is Central Authentication Service.
|
||||||
_m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).'));
|
'rawdescription' => _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,13 +36,13 @@ class CasloginAction extends Action
|
|||||||
$casTempPassword = common_good_rand(16);
|
$casTempPassword = common_good_rand(16);
|
||||||
$user = common_check_user(phpCAS::getUser(), $casTempPassword);
|
$user = common_check_user(phpCAS::getUser(), $casTempPassword);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$this->serverError(_('Incorrect username or password.'));
|
$this->serverError(_m('Incorrect username or password.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// success!
|
// success!
|
||||||
if (!common_set_user($user)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,6 @@ class CasloginAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
common_redirect($url, 303);
|
common_redirect($url, 303);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user