From: Diogo Cordeiro Date: Mon, 10 Jun 2019 13:55:38 +0000 (+0100) Subject: [OpenID] s/sync/synch X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=54f75683c72bd8712ffb239ec18dfccff90c6671;p=quix0rs-gnu-social.git [OpenID] s/sync/synch This commit also fixes the translation in /plugins/OpenID/actions/finishopenidlogin.php#L203-L204 (s/Syncronize/Synchronize) Sync is a bad technical jargon and we should use Synch instead. Synch is already used in other parts of GNU social as seen in plugins/TwitterBridge/classes/Twitter_synch_status.php --- diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 34ee1ecccb..b85ba44c7a 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -50,7 +50,7 @@ if (!defined('STATUSNET')) { */ class OpenIDPlugin extends Plugin { - const PLUGIN_VERSION = '2.1.0'; + const PLUGIN_VERSION = '2.1.1'; // Plugin parameter: set true to disallow non-OpenID logins // If set, overrides the setting in database or $config['site']['openidonly'] @@ -83,8 +83,8 @@ class OpenIDPlugin extends Plugin array('action' => 'finishopenidlogin')); $m->connect('index.php?action=finishaddopenid', array('action' => 'finishaddopenid')); - $m->connect('index.php?action=finishsyncopenid', - array('action' => 'finishsyncopenid')); + $m->connect('index.php?action=finishsynchopenid', + array('action' => 'finishsynchopenid')); $m->connect('main/openidserver', array('action' => 'openidserver')); $m->connect('panel/openid', array('action' => 'openidadminpanel')); @@ -474,7 +474,7 @@ class OpenIDPlugin extends Plugin * @return boolean hook value */ function onEndDocsMenu(&$items) { - $items[] = array('doc', + $items[] = array('doc', array('title' => 'openid'), _m('MENU', 'OpenID'), _('Logging in with OpenID'), @@ -742,7 +742,7 @@ class OpenIDPlugin extends Plugin * * @return boolean hook value (true) */ - + function onOtherAccountProfiles($profile, &$links) { $prefs = User_openid_prefs::getKV('user_id', $profile->id); diff --git a/plugins/OpenID/actions/finishaddopenid.php b/plugins/OpenID/actions/finishaddopenid.php index 12029eb57a..351f6d8409 100644 --- a/plugins/OpenID/actions/finishaddopenid.php +++ b/plugins/OpenID/actions/finishaddopenid.php @@ -138,7 +138,7 @@ class FinishaddopenidAction extends Action return; } - if (isset($_SESSION['openid_sync']) && $_SESSION['openid_sync']) { + if (isset($_SESSION['openid_synch']) && $_SESSION['openid_synch']) { if (Event::handle('StartOpenIDUpdateUser', [$cur, $canonical, &$sreg])) { if (!oid_update_user($cur, $sreg)) { // TRANS: Message in case the user or the user profile cannot be saved in StatusNet. @@ -149,7 +149,7 @@ class FinishaddopenidAction extends Action Event::handle('EndOpenIDUpdateUser', [$cur, $canonical, $sreg]); } - unset($_SESSION['openid_sync']); + unset($_SESSION['openid_synch']); // success! diff --git a/plugins/OpenID/actions/finishopenidlogin.php b/plugins/OpenID/actions/finishopenidlogin.php index 4ba09624cb..1fd204c49b 100644 --- a/plugins/OpenID/actions/finishopenidlogin.php +++ b/plugins/OpenID/actions/finishopenidlogin.php @@ -200,8 +200,8 @@ class FinishopenidloginAction extends Action $this->elementEnd('li'); $this->elementStart('li'); // TRANS: Field label in form in which to connect an OpenID to an existing user on the site. - $this->checkbox('openid-sync', _m('Sync Account'), false, - _m('Syncronize GNU social profile with this OpenID identity.')); + $this->checkbox('openid-synch', _m('Synchronize Account'), false, + _m('Synchronize GNU social profile with this OpenID identity.')); $this->elementEnd('li'); $this->elementEnd('ul'); // TRANS: Button text in form in which to connect an OpenID to an existing user on the site. @@ -431,8 +431,8 @@ class FinishopenidloginAction extends Action { $nickname = $this->trimmed('nickname'); $password = $this->trimmed('password'); - $sync = $this->boolean('openid-sync'); - + $synch = $this->boolean('openid-synch'); + if (!common_check_user($nickname, $password)) { // TRANS: OpenID plugin message. $this->showForm(_m('Invalid username or password.')); @@ -457,7 +457,7 @@ class FinishopenidloginAction extends Action $this->serverError(_m('Error connecting user to OpenID.')); } - if ($sync) { + if ($synch) { if (Event::handle('StartOpenIDUpdateUser', [$user, $canonical, &$sreg])) { oid_update_user($user, $sreg); } diff --git a/plugins/OpenID/actions/finishsynchopenid.php b/plugins/OpenID/actions/finishsynchopenid.php new file mode 100644 index 0000000000..d6708b2e0f --- /dev/null +++ b/plugins/OpenID/actions/finishsynchopenid.php @@ -0,0 +1,166 @@ +. + +/** + * OpenID Synch completion + * + * @package GNUsocial + * @author Bruno Casteleiro + * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later + */ + +defined('GNUSOCIAL') || die(); + +require_once(INSTALLDIR . '/plugins/OpenID/openid.php'); + +/** + * Action that handles OpenID Synch completion. + * + * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later + */ +class FinishsynchopenidAction extends Action +{ + public $msg = null; + + /** + * Handle the redirect back from OpenID confirmation + * + * Check to see if the user's logged in, and then try + * to use the OpenID login system. + * + * @param array $args $_REQUEST arguments + * + * @return void + */ + public function handle() + { + parent::handle(); + if (!common_logged_in()) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. + $this->clientError(_m('Not logged in.')); + } else { + $this->tryLogin(); + } + } + + /** + * Try to log in using OpenID + * + * Check the OpenID for validity; potentially store it. + * + * @return void + */ + public function tryLogin() + { + $consumer = oid_consumer(); + + $response = $consumer->complete(common_local_url('finishsynchopenid')); + + if ($response->status == Auth_OpenID_CANCEL) { + // TRANS: Status message in case the response from the OpenID provider is that the logon attempt was cancelled. + $this->message(_m('OpenID authentication cancelled.')); + return; + } elseif ($response->status == Auth_OpenID_FAILURE) { + // TRANS: OpenID authentication failed; display the error message. + // TRANS: %s is the error message. + $this->message(sprintf( + _m('OpenID authentication failed: %s.'), + $response->message + )); + } elseif ($response->status == Auth_OpenID_SUCCESS) { + $display = $response->getDisplayIdentifier(); + $canonical = ($response->endpoint && $response->endpoint->canonicalID) ? + $response->endpoint->canonicalID : $display; + + $sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse($response); + + if ($sreg_resp) { + $sreg = $sreg_resp->contents(); + } + + // Launchpad teams extension + if (!oid_check_teams($response)) { + // TRANS: OpenID authentication error. + $this->message(_m('OpenID authentication aborted: You are not allowed to login to this site.')); + return; + } + + $cur = common_current_user(); + + // start a transaction + + $cur->query('BEGIN'); + + if (Event::handle('StartOpenIDUpdateUser', [$cur, $canonical, &$sreg])) { + if (!oid_update_user($cur, $sreg)) { + // TRANS: Message in case the user or the user profile cannot be saved in StatusNet. + $this->message(_m('Error updating profile.')); + return; + } + } + Event::handle('EndOpenIDUpdateUser', [$cur, $canonical, $sreg]); + + // success! + + $cur->query('COMMIT'); + + oid_set_last($display); + + common_redirect(common_local_url('openidsettings'), 303); + } + } + + /** + * Show a failure message + * + * Something went wrong. Save the message, and show the page. + * + * @param string $msg Error message to show + * + * @return void + */ + public function message($msg) + { + $this->message = $msg; + $this->showPage(); + } + + /** + * Title of the page + * + * @return string title + */ + public function title() + { + // TRANS: Title after getting the status of the OpenID authorisation request. + // TODO update after understanding the function ^ + return _m('OpenID Synchronization'); + } + + /** + * Show error message + * + * @return void + */ + public function showPageNotice() + { + if ($this->message) { + $this->element('p', 'error', $this->message); + } + } +} diff --git a/plugins/OpenID/actions/finishsyncopenid.php b/plugins/OpenID/actions/finishsyncopenid.php deleted file mode 100644 index 293237af5d..0000000000 --- a/plugins/OpenID/actions/finishsyncopenid.php +++ /dev/null @@ -1,166 +0,0 @@ -. - -/** - * OpenID Sync completion - * - * @package GNUsocial - * @author Bruno Casteleiro - * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org - * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later - */ - -defined('GNUSOCIAL') || die(); - -require_once(INSTALLDIR . '/plugins/OpenID/openid.php'); - -/** - * Action that handles OpenID Sync completion. - * - * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org - * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later - */ -class FinishsyncopenidAction extends Action -{ - public $msg = null; - - /** - * Handle the redirect back from OpenID confirmation - * - * Check to see if the user's logged in, and then try - * to use the OpenID login system. - * - * @param array $args $_REQUEST arguments - * - * @return void - */ - public function handle() - { - parent::handle(); - if (!common_logged_in()) { - // TRANS: Error message displayed when trying to perform an action that requires a logged in user. - $this->clientError(_m('Not logged in.')); - } else { - $this->tryLogin(); - } - } - - /** - * Try to log in using OpenID - * - * Check the OpenID for validity; potentially store it. - * - * @return void - */ - public function tryLogin() - { - $consumer = oid_consumer(); - - $response = $consumer->complete(common_local_url('finishsyncopenid')); - - if ($response->status == Auth_OpenID_CANCEL) { - // TRANS: Status message in case the response from the OpenID provider is that the logon attempt was cancelled. - $this->message(_m('OpenID authentication cancelled.')); - return; - } elseif ($response->status == Auth_OpenID_FAILURE) { - // TRANS: OpenID authentication failed; display the error message. - // TRANS: %s is the error message. - $this->message(sprintf( - _m('OpenID authentication failed: %s.'), - $response->message - )); - } elseif ($response->status == Auth_OpenID_SUCCESS) { - $display = $response->getDisplayIdentifier(); - $canonical = ($response->endpoint && $response->endpoint->canonicalID) ? - $response->endpoint->canonicalID : $display; - - $sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse($response); - - if ($sreg_resp) { - $sreg = $sreg_resp->contents(); - } - - // Launchpad teams extension - if (!oid_check_teams($response)) { - // TRANS: OpenID authentication error. - $this->message(_m('OpenID authentication aborted: You are not allowed to login to this site.')); - return; - } - - $cur = common_current_user(); - - // start a transaction - - $cur->query('BEGIN'); - - if (Event::handle('StartOpenIDUpdateUser', [$cur, $canonical, &$sreg])) { - if (!oid_update_user($cur, $sreg)) { - // TRANS: Message in case the user or the user profile cannot be saved in StatusNet. - $this->message(_m('Error updating profile.')); - return; - } - } - Event::handle('EndOpenIDUpdateUser', [$cur, $canonical, $sreg]); - - // success! - - $cur->query('COMMIT'); - - oid_set_last($display); - - common_redirect(common_local_url('openidsettings'), 303); - } - } - - /** - * Show a failure message - * - * Something went wrong. Save the message, and show the page. - * - * @param string $msg Error message to show - * - * @return void - */ - public function message($msg) - { - $this->message = $msg; - $this->showPage(); - } - - /** - * Title of the page - * - * @return string title - */ - public function title() - { - // TRANS: Title after getting the status of the OpenID authorisation request. - // TODO update after understanding the function ^ - return _m('OpenID Synchronization'); - } - - /** - * Show error message - * - * @return void - */ - public function showPageNotice() - { - if ($this->message) { - $this->element('p', 'error', $this->message); - } - } -} diff --git a/plugins/OpenID/actions/openidsettings.php b/plugins/OpenID/actions/openidsettings.php index 9349ad91d8..ccfda63799 100644 --- a/plugins/OpenID/actions/openidsettings.php +++ b/plugins/OpenID/actions/openidsettings.php @@ -108,7 +108,7 @@ class OpenidsettingsAction extends SettingsAction $this->elementEnd('li'); $this->elementStart('li'); // TRANS: Field label. - $this->checkbox('openid-sync', _m('Synchronize Account'), false, + $this->checkbox('openid-synch', _m('Synchronize Account'), false, // TRANS: Form guide. _m('Synchronize GNU social profile with this OpenID identity.')); $this->elementEnd('li'); @@ -146,8 +146,8 @@ class OpenidsettingsAction extends SettingsAction $this->hidden('token', common_session_token()); $this->element('a', ['href' => $oid->canonical], $oid->display); $this->hidden("openid_url", $oid->canonical); - // TRANS: Button text to sync OpenID with the GS profile. - $this->submit("sync", _m('BUTTON', 'Synchronize'), 'submit sync'); + // TRANS: Button text to synchronize OpenID with the GS profile. + $this->submit("synch", _m('BUTTON', 'Synchronize'), 'submit synch'); $this->elementEnd('fieldset'); $this->elementEnd('form'); } @@ -171,7 +171,7 @@ class OpenidsettingsAction extends SettingsAction $this->hidden("openid_url{$idx}", $oid->canonical, 'openid_url'); $this->elementStart('span', ['class' => 'element_actions']); // TRANS: Button text to sync an OpenID with the GS profile. - $this->submit("sync{$idx}", _m('BUTTON', 'Synchronize'), 'submit', 'sync'); + $this->submit("synch{$idx}", _m('BUTTON', 'Synchronize'), 'submit', 'synch'); // TRANS: Button text to remove an OpenID. $this->submit("remove{$idx}", _m('BUTTON', 'Remove'), 'submit', 'remove'); $this->elementEnd('span'); @@ -248,19 +248,19 @@ class OpenidsettingsAction extends SettingsAction throw new ServerException(_m('Cannot add new providers.')); } else { common_ensure_session(); - $_SESSION['openid_sync'] = $this->boolean('openid-sync'); + $_SESSION['openid_synch'] = $this->boolean('openid-synch'); $result = oid_authenticate($this->trimmed('openid_url'), 'finishaddopenid'); if (is_string($result)) { // error message - unset($_SESSION['openid-sync']); + unset($_SESSION['openid-synch']); throw new ServerException($result); } return _('Added new provider.'); } } elseif ($this->arg('remove')) { return $this->removeOpenid(); - } elseif ($this->arg('sync')) { - return $this->syncOpenid(); + } elseif ($this->arg('synch')) { + return $this->synchOpenid(); } elseif ($this->arg('remove_trustroots')) { return $this->removeTrustroots(); } elseif ($this->arg('save_prefs')) { @@ -324,11 +324,11 @@ class OpenidsettingsAction extends SettingsAction } /** - * Handles a request to sync an OpenID to the user's profile + * Handles a request to synch an OpenID to the user's profile * * @return void */ - public function syncOpenid() + public function synchOpenid() { $oid = User_openid::getKV('canonical', $this->trimmed('openid_url')); @@ -336,7 +336,7 @@ class OpenidsettingsAction extends SettingsAction throw new ClientException(_m('No such OpenID.')); } - $result = oid_authenticate($this->trimmed('openid_url'), 'finishsyncopenid'); + $result = oid_authenticate($this->trimmed('openid_url'), 'finishsynchopenid'); if (is_string($result)) { // error message throw new ServerException($result); } diff --git a/plugins/OpenID/locale/OpenID.pot b/plugins/OpenID/locale/OpenID.pot index 3a407a3bb5..c7a3751225 100644 --- a/plugins/OpenID/locale/OpenID.pot +++ b/plugins/OpenID/locale/OpenID.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-09 16:58+0100\n" +"POT-Creation-Date: 2019-06-10 15:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,233 +17,330 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#. TRANS: Title for identity verification page. -#: actions/openidtrust.php:51 -msgid "OpenID Identity Verification" -msgstr "" - -#. TRANS: Client error when visiting page directly. -#: actions/openidtrust.php:69 -msgid "" -"This page should only be reached during OpenID processing, not directly." +#. TRANS: Client error message trying to log on with OpenID while already logged on. +#: actions/openidlogin.php:33 actions/finishopenidlogin.php:37 +msgid "Already logged in." msgstr "" -#. TRANS: Page notice. %s is a trustroot name. -#: actions/openidtrust.php:118 +#. TRANS: OpenID plugin message. Rememberme logins have to reauthenticate before changing any profile settings. +#. TRANS: "OpenID" is the display text for a link with URL "(%%doc.openid%%)". +#: actions/openidlogin.php:74 #, php-format msgid "" -"%s has asked to verify your identity. Click Continue to verify your identity " -"and login without creating a new password." -msgstr "" - -#. TRANS: Button text to continue OpenID identity verification. -#. TRANS: button label for OAuth authorization page when needing OpenID authentication first. -#: actions/openidtrust.php:136 OpenIDPlugin.php:617 -msgctxt "BUTTON" -msgid "Continue" -msgstr "" - -#. TRANS: Button text to cancel OpenID identity verification. -#: actions/openidtrust.php:138 -msgctxt "BUTTON" -msgid "Cancel" +"For security reasons, please re-login with your [OpenID](%%doc.openid%%) " +"before changing your settings." msgstr "" -#. TRANS: Error message displayed when trying to perform an action that requires a logged in user. -#: actions/finishsyncopenid.php:55 actions/finishaddopenid.php:66 -msgid "Not logged in." +#. TRANS: OpenID plugin message. +#. TRANS: "OpenID" is the display text for a link with URL "(%%doc.openid%%)". +#: actions/openidlogin.php:80 +#, php-format +msgid "Login with an [OpenID](%%doc.openid%%) account." msgstr "" -#. TRANS: Status message in case the response from the OpenID provider is that the logon attempt was cancelled. -#: actions/finishsyncopenid.php:76 actions/finishopenidlogin.php:254 -#: actions/finishaddopenid.php:87 -msgid "OpenID authentication cancelled." +#. TRANS: OpenID plugin message. Title. +#: actions/openidlogin.php:114 +msgctxt "TITLE" +msgid "OpenID Login" msgstr "" -#. TRANS: OpenID authentication failed; display the error message. %s is the error message. -#: actions/finishsyncopenid.php:82 actions/finishopenidlogin.php:258 -#: actions/finishaddopenid.php:93 -#, php-format -msgid "OpenID authentication failed: %s." +#. TRANS: OpenID plugin logon form legend. +#: actions/openidlogin.php:132 OpenIDPlugin.php:634 +msgctxt "LEGEND" +msgid "OpenID login" msgstr "" -#. TRANS: OpenID authentication error. -#. TRANS: Message displayed when OpenID authentication is aborted. -#. TRANS: OpenID authentication error. -#: actions/finishsyncopenid.php:99 actions/finishopenidlogin.php:279 -#: actions/finishaddopenid.php:110 -msgid "" -"OpenID authentication aborted: You are not allowed to login to this site." +#. TRANS: Field label. +#: actions/openidlogin.php:140 +msgctxt "LABEL" +msgid "OpenID provider" msgstr "" -#. TRANS: Message in case the user or the user profile cannot be saved in StatusNet. -#: actions/finishsyncopenid.php:112 actions/finishaddopenid.php:145 -msgid "Error updating profile." +#. TRANS: Form guide. +#: actions/openidlogin.php:149 OpenIDPlugin.php:651 +msgid "Enter your username." msgstr "" -#. TRANS: Title after getting the status of the OpenID authorisation request. -#. TODO update after understanding the function ^ -#: actions/finishsyncopenid.php:152 -msgid "OpenID Synchronization" +#. TRANS: Form guide. +#: actions/openidlogin.php:151 OpenIDPlugin.php:653 +msgid "You will be sent to the provider's site for authentication." msgstr "" -#. TRANS: OpenID plugin client error given trying to add an unauthorised OpenID to a user (403). -#. TRANS: %s is a request identity. -#: actions/openidserver.php:113 -#, php-format -msgid "You are not authorized to use the identity %s." +#. TRANS: OpenID plugin logon form field label. +#. TRANS: Field label. +#. TRANS: OpenID plugin logon form field label. +#: actions/openidlogin.php:155 actions/openidsettings.php:103 +#: OpenIDPlugin.php:657 +msgid "OpenID URL" msgstr "" -#. TRANS: OpenID plugin client error given when not getting a response for a given OpenID provider (500). -#: actions/openidserver.php:134 -msgid "Just an OpenID provider. Nothing to see here, move along..." +#. TRANS: OpenID plugin logon form field title. +#. TRANS: OpenID plugin logon form field instructions. +#: actions/openidlogin.php:158 OpenIDPlugin.php:660 +msgid "Your OpenID URL." msgstr "" -#. TRANS: Client error message trying to log on with OpenID while already logged on. -#: actions/finishopenidlogin.php:37 actions/openidlogin.php:33 -msgid "Already logged in." +#. TRANS: OpenID plugin logon form checkbox label for setting to put the OpenID information in a cookie. +#: actions/openidlogin.php:163 +msgid "Remember me" msgstr "" -#. TRANS: Message given when there is a problem with the user's session token. -#: actions/finishopenidlogin.php:42 -msgid "There was a problem with your session token. Try again, please." +#. TRANS: OpenID plugin logon form field title. +#: actions/openidlogin.php:165 +msgid "Automatically login in the future; not for shared computers!" msgstr "" -#: actions/finishopenidlogin.php:49 -msgid "You cannot register if you do not agree to the license." +#. TRANS: OpenID plugin logon form button label to start logon with the data provided in the logon form. +#: actions/openidlogin.php:170 +msgctxt "BUTTON" +msgid "Login" msgstr "" -#: actions/finishopenidlogin.php:60 -msgid "An unknown error has occured." +#. TRANS: Title of OpenID settings page for a user. +#: actions/openidsettings.php:57 +msgctxt "TITLE" +msgid "OpenID settings" msgstr "" -#. TRANS: Instructions given after a first successful logon using OpenID. -#. TRANS: %s is the site name. -#: actions/finishopenidlogin.php:77 +#. TRANS: Form instructions for OpenID settings. +#. TRANS: This message contains Markdown links in the form [description](link). +#: actions/openidsettings.php:69 #, php-format msgid "" -"This is the first time you have logged into %s so we must connect your " -"OpenID to a local account. You can either create a new account, or connect " -"with your existing account, if you have one." -msgstr "" - -#. TRANS: Title -#: actions/finishopenidlogin.php:84 -msgctxt "TITLE" -msgid "OpenID Account Setup" +"[OpenID](%%doc.openid%%) lets you log into many sites with the same user " +"account. Manage your associated OpenIDs from here." msgstr "" #. TRANS: Fieldset legend. -#: actions/finishopenidlogin.php:122 -msgid "Create new account" +#: actions/openidsettings.php:98 +msgctxt "LEGEND" +msgid "Add OpenID" msgstr "" #. TRANS: Form guide. -#: actions/finishopenidlogin.php:125 -msgid "Create a new user with this nickname." +#: actions/openidsettings.php:105 +msgid "An OpenID URL which identifies you." msgstr "" -#: actions/finishopenidlogin.php:134 -msgid "New nickname" +#. TRANS: Field label. +#. TRANS: Field label in form in which to connect an OpenID to an existing user on the site. +#: actions/openidsettings.php:111 actions/finishopenidlogin.php:203 +msgid "Synchronize Account" msgstr "" -#. TRANS: Field title. -#: actions/finishopenidlogin.php:137 -msgid "1-64 lowercase letters or numbers, no punctuation or spaces." +#. TRANS: Form guide. +#: actions/openidsettings.php:113 actions/finishopenidlogin.php:204 +msgid "Synchronize GNU social profile with this OpenID identity." msgstr "" -#. TRANS: Field label. -#: actions/finishopenidlogin.php:141 -msgid "Email" +#. TRANS: Button text for adding an OpenID URL. +#: actions/openidsettings.php:117 +msgctxt "BUTTON" +msgid "Add" msgstr "" -#. TRANS: Field title. -#: actions/finishopenidlogin.php:144 -msgid "Used only for updates, announcements, and password recovery." +#. TRANS: Header on OpenID settings page. +#: actions/openidsettings.php:129 +msgctxt "HEADER" +msgid "OpenID Actions" msgstr "" -#. TRANS: OpenID plugin link text. -#. TRANS: %s is a link to a license with the license name as link text. -#: actions/finishopenidlogin.php:161 -#, php-format +#. TRANS: Form guide. +#: actions/openidsettings.php:134 msgid "" -"My text and files are available under %s except this private data: password, " -"email address, IM address, and phone number." +"You can't remove your main OpenID account without either adding a password " +"to your GNU social account or another OpenID account. You can synchronize " +"your profile with your OpenID by clicking the button labeled \"Synchronize\"." msgstr "" -#. TRANS: Button label in form in which to create a new user on the site for an OpenID. -#: actions/finishopenidlogin.php:174 +#. TRANS: Button text to synchronize OpenID with the GS profile. +#. TRANS: Button text to sync an OpenID with the GS profile. +#: actions/openidsettings.php:150 actions/openidsettings.php:174 msgctxt "BUTTON" -msgid "Create" -msgstr "" - -#. TRANS: Used as form legend for form in which to connect an OpenID to an existing user on the site. -#: actions/finishopenidlogin.php:188 -msgid "Connect existing account" +msgid "Synchronize" msgstr "" -#. TRANS: User instructions for form in which to connect an OpenID to an existing user on the site. -#: actions/finishopenidlogin.php:191 +#. TRANS: Form guide. +#: actions/openidsettings.php:157 msgid "" -"If you already have an account, login with your username and password to " -"connect it to your OpenID." +"You can remove an OpenID from your account by clicking the button labeled " +"\"Remove\". You can synchronize your profile with an OpenID by clicking the " +"button labeled \"Synchronize\"." msgstr "" -#. TRANS: Field label in form in which to connect an OpenID to an existing user on the site. -#: actions/finishopenidlogin.php:195 -msgid "Existing nickname" +#. TRANS: Button text to remove an OpenID. +#. TRANS: Button text to remove an OpenID trustroot. +#: actions/openidsettings.php:176 actions/openidsettings.php:219 +msgctxt "BUTTON" +msgid "Remove" msgstr "" -#. TRANS: Field label in form in which to connect an OpenID to an existing user on the site. -#: actions/finishopenidlogin.php:199 -msgid "Password" +#. TRANS: Fieldset legend. +#: actions/openidsettings.php:192 +msgid "OpenID Trusted Sites" msgstr "" -#. TRANS: Field label in form in which to connect an OpenID to an existing user on the site. -#: actions/finishopenidlogin.php:203 -msgid "Sync Account" +#. TRANS: Form guide. +#: actions/openidsettings.php:196 +msgid "" +"The following sites are allowed to access your identity and log you in. You " +"can remove a site from this list to deny it access to your OpenID." msgstr "" -#: actions/finishopenidlogin.php:204 -msgid "Syncronize GNU social profile with this OpenID identity." +#: actions/openidsettings.php:225 +msgctxt "LEGEND" +msgid "Preferences" msgstr "" -#. TRANS: Button text in form in which to connect an OpenID to an existing user on the site. -#: actions/finishopenidlogin.php:208 +#. TRANS: Button text to save OpenID prefs +#. TRANS: Button text to save OpenID settings. +#: actions/openidsettings.php:229 actions/openidadminpanel.php:284 msgctxt "BUTTON" -msgid "Connect" +msgid "Save" msgstr "" -#. TRANS: OpenID plugin message. No new user registration is allowed on the site. -#. TRANS: OpenID plugin message. No new user registration is allowed on the site without an invitation code, and none was provided. -#: actions/finishopenidlogin.php:335 actions/finishopenidlogin.php:344 -msgid "Registration not allowed." +#. TRANS: Form validation error if no OpenID providers can be added. +#: actions/openidsettings.php:248 +msgid "Cannot add new providers." msgstr "" -#. TRANS: OpenID plugin message. No new user registration is allowed on the site without an invitation code, and the one provided was not valid. -#: actions/finishopenidlogin.php:351 -msgid "Not a valid invitation code." +#. TRANS: Unexpected form validation error. +#: actions/openidsettings.php:271 +msgid "No known action for POST." msgstr "" -#. TRANS: OpenID plugin server error. A stored OpenID cannot be retrieved. -#. TRANS: OpenID plugin server error. A stored OpenID cannot be found. -#: actions/finishopenidlogin.php:366 actions/finishopenidlogin.php:450 -msgid "Stored OpenID not found." +#. TRANS: Form validation error when trying to remove a non-existing trustroot. +#: actions/openidsettings.php:293 +msgid "No such OpenID trustroot." msgstr "" -#. TRANS: OpenID plugin server error. -#: actions/finishopenidlogin.php:375 -msgid "Creating new account for OpenID that already has a user." +#. TRANS: Success message after removing trustroots. +#: actions/openidsettings.php:298 +msgid "Trustroots removed." msgstr "" -#. TRANS: OpenID plugin message. -#: actions/finishopenidlogin.php:438 -msgid "Invalid username or password." +#. TRANS: Form validation error for a non-existing OpenID. +#: actions/openidsettings.php:315 actions/openidsettings.php:336 +msgid "No such OpenID." msgstr "" -#. TRANS: OpenID plugin server error. The user or user profile could not be saved. -#: actions/finishopenidlogin.php:457 -msgid "Error connecting user to OpenID." +#. TRANS: Form validation error if OpenID is connected to another user. +#: actions/openidsettings.php:319 +msgid "That OpenID does not belong to you." +msgstr "" + +#. TRANS: Success message after removing an OpenID. +#: actions/openidsettings.php:323 +msgid "OpenID removed." +msgstr "" + +#: actions/openidsettings.php:343 +msgid "Synchronized OpenID." +msgstr "" + +#: actions/openidsettings.php:375 +msgid "OpenID preferences saved." +msgstr "" + +#. TRANS: Error message displayed when trying to perform an action that requires a logged in user. +#: actions/finishaddopenid.php:66 actions/finishsynchopenid.php:55 +msgid "Not logged in." +msgstr "" + +#. TRANS: Status message in case the response from the OpenID provider is that the logon attempt was cancelled. +#: actions/finishaddopenid.php:87 actions/finishsynchopenid.php:76 +#: actions/finishopenidlogin.php:254 +msgid "OpenID authentication cancelled." +msgstr "" + +#. TRANS: OpenID authentication failed; display the error message. %s is the error message. +#: actions/finishaddopenid.php:93 actions/finishsynchopenid.php:82 +#: actions/finishopenidlogin.php:258 +#, php-format +msgid "OpenID authentication failed: %s." +msgstr "" + +#. TRANS: OpenID authentication error. +#. TRANS: Message displayed when OpenID authentication is aborted. +#: actions/finishaddopenid.php:110 actions/finishsynchopenid.php:99 +#: actions/finishopenidlogin.php:279 +msgid "" +"OpenID authentication aborted: You are not allowed to login to this site." +msgstr "" + +#. TRANS: Message in case a user tries to add an OpenID that is already connected to them. +#: actions/finishaddopenid.php:121 +msgid "You already have this OpenID!" +msgstr "" + +#. TRANS: Message in case a user tries to add an OpenID that is already used by another user. +#: actions/finishaddopenid.php:124 +msgid "Someone else already has this OpenID." +msgstr "" + +#. TRANS: Message in case the OpenID object cannot be connected to the user. +#: actions/finishaddopenid.php:137 +msgid "Error connecting user." +msgstr "" + +#. TRANS: Message in case the user or the user profile cannot be saved in StatusNet. +#: actions/finishaddopenid.php:145 actions/finishsynchopenid.php:112 +msgid "Error updating profile." +msgstr "" + +#. TRANS: Title after getting the status of the OpenID authorisation request. +#: actions/finishaddopenid.php:187 +msgid "OpenID Login" +msgstr "" + +#. TRANS: Title after getting the status of the OpenID authorisation request. +#. TODO update after understanding the function ^ +#: actions/finishsynchopenid.php:152 +msgid "OpenID Synchronization" +msgstr "" + +#. TRANS: Title for identity verification page. +#: actions/openidtrust.php:51 +msgid "OpenID Identity Verification" +msgstr "" + +#. TRANS: Client error when visiting page directly. +#: actions/openidtrust.php:69 +msgid "" +"This page should only be reached during OpenID processing, not directly." +msgstr "" + +#. TRANS: Page notice. %s is a trustroot name. +#: actions/openidtrust.php:118 +#, php-format +msgid "" +"%s has asked to verify your identity. Click Continue to verify your identity " +"and login without creating a new password." +msgstr "" + +#. TRANS: Button text to continue OpenID identity verification. +#. TRANS: button label for OAuth authorization page when needing OpenID authentication first. +#: actions/openidtrust.php:136 OpenIDPlugin.php:617 +msgctxt "BUTTON" +msgid "Continue" +msgstr "" + +#. TRANS: Button text to cancel OpenID identity verification. +#: actions/openidtrust.php:138 +msgctxt "BUTTON" +msgid "Cancel" +msgstr "" + +#. TRANS: OpenID plugin client error given trying to add an unauthorised OpenID to a user (403). +#. TRANS: %s is a request identity. +#: actions/openidserver.php:113 +#, php-format +msgid "You are not authorized to use the identity %s." +msgstr "" + +#. TRANS: OpenID plugin client error given when not getting a response for a given OpenID provider (500). +#: actions/openidserver.php:134 +msgid "Just an OpenID provider. Nothing to see here, move along..." msgstr "" #. TRANS: Title for OpenID bridge administration page. @@ -333,247 +430,142 @@ msgid "" "authentication for all users!" msgstr "" -#. TRANS: Button text to save OpenID settings. -#. TRANS: Button text to save OpenID prefs -#: actions/openidadminpanel.php:284 actions/openidsettings.php:229 -msgctxt "BUTTON" -msgid "Save" -msgstr "" - #. TRANS: Button title to save OpenID settings. #: actions/openidadminpanel.php:286 msgid "Save OpenID settings." msgstr "" -#. TRANS: Title of OpenID settings page for a user. -#: actions/openidsettings.php:57 -msgctxt "TITLE" -msgid "OpenID settings" -msgstr "" - -#. TRANS: Form instructions for OpenID settings. -#. TRANS: This message contains Markdown links in the form [description](link). -#: actions/openidsettings.php:69 -#, php-format -msgid "" -"[OpenID](%%doc.openid%%) lets you log into many sites with the same user " -"account. Manage your associated OpenIDs from here." -msgstr "" - -#. TRANS: Fieldset legend. -#: actions/openidsettings.php:98 -msgctxt "LEGEND" -msgid "Add OpenID" -msgstr "" - -#. TRANS: Field label. -#. TRANS: OpenID plugin logon form field label. -#: actions/openidsettings.php:103 actions/openidlogin.php:155 -#: OpenIDPlugin.php:657 -msgid "OpenID URL" -msgstr "" - -#. TRANS: Form guide. -#: actions/openidsettings.php:105 -msgid "An OpenID URL which identifies you." -msgstr "" - -#. TRANS: Field label. -#: actions/openidsettings.php:111 -msgid "Synchronize Account" -msgstr "" - -#. TRANS: Form guide. -#: actions/openidsettings.php:113 -msgid "Synchronize GNU social profile with this OpenID identity." -msgstr "" - -#. TRANS: Button text for adding an OpenID URL. -#: actions/openidsettings.php:117 -msgctxt "BUTTON" -msgid "Add" -msgstr "" - -#. TRANS: Header on OpenID settings page. -#: actions/openidsettings.php:129 -msgctxt "HEADER" -msgid "OpenID Actions" +#. TRANS: Message given when there is a problem with the user's session token. +#: actions/finishopenidlogin.php:42 +msgid "There was a problem with your session token. Try again, please." msgstr "" -#. TRANS: Form guide. -#: actions/openidsettings.php:134 -msgid "" -"You can't remove your main OpenID account without either adding a password " -"to your GNU social account or another OpenID account. You can synchronize " -"your profile with your OpenID by clicking the button labeled \"Synchronize\"." +#: actions/finishopenidlogin.php:49 +msgid "You cannot register if you do not agree to the license." msgstr "" -#. TRANS: Button text to sync OpenID with the GS profile. -#. TRANS: Button text to sync an OpenID with the GS profile. -#: actions/openidsettings.php:150 actions/openidsettings.php:174 -msgctxt "BUTTON" -msgid "Synchronize" +#: actions/finishopenidlogin.php:60 +msgid "An unknown error has occured." msgstr "" -#. TRANS: Form guide. -#: actions/openidsettings.php:157 +#. TRANS: Instructions given after a first successful logon using OpenID. +#. TRANS: %s is the site name. +#: actions/finishopenidlogin.php:77 +#, php-format msgid "" -"You can remove an OpenID from your account by clicking the button labeled " -"\"Remove\". You can synchronize your profile with an OpenID by clicking the " -"button labeled \"Synchronize\"." +"This is the first time you have logged into %s so we must connect your " +"OpenID to a local account. You can either create a new account, or connect " +"with your existing account, if you have one." msgstr "" -#. TRANS: Button text to remove an OpenID. -#. TRANS: Button text to remove an OpenID trustroot. -#: actions/openidsettings.php:176 actions/openidsettings.php:219 -msgctxt "BUTTON" -msgid "Remove" +#. TRANS: Title +#: actions/finishopenidlogin.php:84 +msgctxt "TITLE" +msgid "OpenID Account Setup" msgstr "" #. TRANS: Fieldset legend. -#: actions/openidsettings.php:192 -msgid "OpenID Trusted Sites" +#: actions/finishopenidlogin.php:122 +msgid "Create new account" msgstr "" #. TRANS: Form guide. -#: actions/openidsettings.php:196 -msgid "" -"The following sites are allowed to access your identity and log you in. You " -"can remove a site from this list to deny it access to your OpenID." -msgstr "" - -#: actions/openidsettings.php:225 -msgctxt "LEGEND" -msgid "Preferences" -msgstr "" - -#. TRANS: Form validation error if no OpenID providers can be added. -#: actions/openidsettings.php:248 -msgid "Cannot add new providers." -msgstr "" - -#. TRANS: Unexpected form validation error. -#: actions/openidsettings.php:271 -msgid "No known action for POST." -msgstr "" - -#. TRANS: Form validation error when trying to remove a non-existing trustroot. -#: actions/openidsettings.php:293 -msgid "No such OpenID trustroot." -msgstr "" - -#. TRANS: Success message after removing trustroots. -#: actions/openidsettings.php:298 -msgid "Trustroots removed." -msgstr "" - -#. TRANS: Form validation error for a non-existing OpenID. -#: actions/openidsettings.php:315 actions/openidsettings.php:336 -msgid "No such OpenID." +#: actions/finishopenidlogin.php:125 +msgid "Create a new user with this nickname." msgstr "" -#. TRANS: Form validation error if OpenID is connected to another user. -#: actions/openidsettings.php:319 -msgid "That OpenID does not belong to you." +#: actions/finishopenidlogin.php:134 +msgid "New nickname" msgstr "" -#. TRANS: Success message after removing an OpenID. -#: actions/openidsettings.php:323 -msgid "OpenID removed." +#. TRANS: Field title. +#: actions/finishopenidlogin.php:137 +msgid "1-64 lowercase letters or numbers, no punctuation or spaces." msgstr "" -#: actions/openidsettings.php:343 -msgid "Synchronized OpenID." +#. TRANS: Field label. +#: actions/finishopenidlogin.php:141 +msgid "Email" msgstr "" -#: actions/openidsettings.php:375 -msgid "OpenID preferences saved." +#. TRANS: Field title. +#: actions/finishopenidlogin.php:144 +msgid "Used only for updates, announcements, and password recovery." msgstr "" -#. TRANS: OpenID plugin message. Rememberme logins have to reauthenticate before changing any profile settings. -#. TRANS: "OpenID" is the display text for a link with URL "(%%doc.openid%%)". -#: actions/openidlogin.php:74 +#. TRANS: OpenID plugin link text. +#. TRANS: %s is a link to a license with the license name as link text. +#: actions/finishopenidlogin.php:161 #, php-format msgid "" -"For security reasons, please re-login with your [OpenID](%%doc.openid%%) " -"before changing your settings." -msgstr "" - -#. TRANS: OpenID plugin message. -#. TRANS: "OpenID" is the display text for a link with URL "(%%doc.openid%%)". -#: actions/openidlogin.php:80 -#, php-format -msgid "Login with an [OpenID](%%doc.openid%%) account." -msgstr "" - -#. TRANS: OpenID plugin message. Title. -#: actions/openidlogin.php:114 -msgctxt "TITLE" -msgid "OpenID Login" +"My text and files are available under %s except this private data: password, " +"email address, IM address, and phone number." msgstr "" -#. TRANS: OpenID plugin logon form legend. -#: actions/openidlogin.php:132 OpenIDPlugin.php:634 -msgctxt "LEGEND" -msgid "OpenID login" +#. TRANS: Button label in form in which to create a new user on the site for an OpenID. +#: actions/finishopenidlogin.php:174 +msgctxt "BUTTON" +msgid "Create" msgstr "" -#. TRANS: Field label. -#: actions/openidlogin.php:140 -msgctxt "LABEL" -msgid "OpenID provider" +#. TRANS: Used as form legend for form in which to connect an OpenID to an existing user on the site. +#: actions/finishopenidlogin.php:188 +msgid "Connect existing account" msgstr "" -#. TRANS: Form guide. -#: actions/openidlogin.php:149 OpenIDPlugin.php:651 -msgid "Enter your username." +#. TRANS: User instructions for form in which to connect an OpenID to an existing user on the site. +#: actions/finishopenidlogin.php:191 +msgid "" +"If you already have an account, login with your username and password to " +"connect it to your OpenID." msgstr "" -#. TRANS: Form guide. -#: actions/openidlogin.php:151 OpenIDPlugin.php:653 -msgid "You will be sent to the provider's site for authentication." +#. TRANS: Field label in form in which to connect an OpenID to an existing user on the site. +#: actions/finishopenidlogin.php:195 +msgid "Existing nickname" msgstr "" -#. TRANS: OpenID plugin logon form field title. -#. TRANS: OpenID plugin logon form field instructions. -#: actions/openidlogin.php:158 OpenIDPlugin.php:660 -msgid "Your OpenID URL." +#. TRANS: Field label in form in which to connect an OpenID to an existing user on the site. +#: actions/finishopenidlogin.php:199 +msgid "Password" msgstr "" -#. TRANS: OpenID plugin logon form checkbox label for setting to put the OpenID information in a cookie. -#: actions/openidlogin.php:163 -msgid "Remember me" +#. TRANS: Button text in form in which to connect an OpenID to an existing user on the site. +#: actions/finishopenidlogin.php:208 +msgctxt "BUTTON" +msgid "Connect" msgstr "" -#. TRANS: OpenID plugin logon form field title. -#: actions/openidlogin.php:165 -msgid "Automatically login in the future; not for shared computers!" +#. TRANS: OpenID plugin message. No new user registration is allowed on the site. +#. TRANS: OpenID plugin message. No new user registration is allowed on the site without an invitation code, and none was provided. +#: actions/finishopenidlogin.php:335 actions/finishopenidlogin.php:344 +msgid "Registration not allowed." msgstr "" -#. TRANS: OpenID plugin logon form button label to start logon with the data provided in the logon form. -#: actions/openidlogin.php:170 -msgctxt "BUTTON" -msgid "Login" +#. TRANS: OpenID plugin message. No new user registration is allowed on the site without an invitation code, and the one provided was not valid. +#: actions/finishopenidlogin.php:351 +msgid "Not a valid invitation code." msgstr "" -#. TRANS: Message in case a user tries to add an OpenID that is already connected to them. -#: actions/finishaddopenid.php:121 -msgid "You already have this OpenID!" +#. TRANS: OpenID plugin server error. A stored OpenID cannot be retrieved. +#. TRANS: OpenID plugin server error. A stored OpenID cannot be found. +#: actions/finishopenidlogin.php:366 actions/finishopenidlogin.php:450 +msgid "Stored OpenID not found." msgstr "" -#. TRANS: Message in case a user tries to add an OpenID that is already used by another user. -#: actions/finishaddopenid.php:124 -msgid "Someone else already has this OpenID." +#. TRANS: OpenID plugin server error. +#: actions/finishopenidlogin.php:375 +msgid "Creating new account for OpenID that already has a user." msgstr "" -#. TRANS: Message in case the OpenID object cannot be connected to the user. -#: actions/finishaddopenid.php:137 -msgid "Error connecting user." +#. TRANS: OpenID plugin message. +#: actions/finishopenidlogin.php:438 +msgid "Invalid username or password." msgstr "" -#. TRANS: Title after getting the status of the OpenID authorisation request. -#: actions/finishaddopenid.php:187 -msgid "OpenID Login" +#. TRANS: OpenID plugin server error. The user or user profile could not be saved. +#: actions/finishopenidlogin.php:457 +msgid "Error connecting user to OpenID." msgstr "" #. TRANS: Client exception thrown when an action is not available.