X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FCasAuthentication%2FCasAuthenticationPlugin.php;h=ecc642b8568ebac7796cda0c8af532142a334d9d;hb=8104b1f766132bf0494694b8971a7932aa237f17;hp=483b060abdba12d03806da23eccc0c26a129b063;hpb=26b03240271d061177a258dbae46bc384dbc9d6a;p=quix0rs-gnu-social.git diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 483b060abd..ecc642b856 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -22,7 +22,7 @@ * @category Plugin * @package StatusNet * @author Craig Andrews - * @copyright 2009 Craig Andrews http://candrews.integralblue.com + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -74,13 +74,15 @@ class CasAuthenticationPlugin extends AuthenticationPlugin return true; } - function onEndLoginGroupNav(&$action) + function onEndLoginGroupNav($action) { $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,16 @@ class CasAuthenticationPlugin extends AuthenticationPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->server)){ - throw new Exception("must specify a server"); + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. + throw new Exception(_m("Specifying a server is required.")); } if(!isset($this->port)){ - throw new Exception("must specify a port"); + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. + throw new Exception(_m("Specifying a port is required.")); } if(!isset($this->path)){ - throw new Exception("must specify a path"); + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. + 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 @@ -137,6 +144,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin $casSettings['server']=$this->server; $casSettings['port']=$this->port; $casSettings['path']=$this->path; + $casSettings['takeOverLogin']=$this->takeOverLogin; } function onPluginVersion(&$versions) @@ -145,8 +153,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; } }