From f1a81ca1863d5e07eeccb2dcca60c8c52e8ebf84 Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Wed, 11 Dec 2013 02:34:38 +0200 Subject: [PATCH] Add personal tools messages for messages login, userlogout, createaccount Add personal tools messages for: * login -- pt-login * userlogout -- pt-userlogout * createaccount -- pt-createaccount Those messages shouldn't be used as personal tools messages. Bug: 52861 Change-Id: I8fb229b15c4736945db46672b42a26fd7dafb5f6 --- includes/SkinTemplate.php | 6 +++--- includes/templates/Userlogin.php | 2 +- languages/messages/MessagesEn.php | 3 +++ languages/messages/MessagesQqq.php | 21 ++++++++++----------- maintenance/language/messages.inc | 3 +++ 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 7e229ee285..4f0e1fe850 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -709,7 +709,7 @@ class SkinTemplate extends Skin { 'active' => $active ); $personal_urls['logout'] = array( - 'text' => $this->msg( 'userlogout' )->text(), + 'text' => $this->msg( 'pt-userlogout' )->text(), 'href' => self::makeSpecialUrl( 'Userlogout', // userlogout link must always contain an & character, otherwise we might not be able // to detect a buggy precaching proxy (bug 17790) @@ -721,7 +721,7 @@ class SkinTemplate extends Skin { $useCombinedLoginLink = $this->useCombinedLoginLink(); $loginlink = $this->getUser()->isAllowed( 'createaccount' ) && $useCombinedLoginLink ? 'nav-login-createaccount' - : 'login'; + : 'pt-login'; $is_signup = $request->getText( 'type' ) == 'signup'; $login_url = array( @@ -730,7 +730,7 @@ class SkinTemplate extends Skin { 'active' => $title->isSpecial( 'Userlogin' ) && ( $loginlink == 'nav-login-createaccount' || !$is_signup ), ); $createaccount_url = array( - 'text' => $this->msg( 'createaccount' )->text(), + 'text' => $this->msg( 'pt-createaccount' )->text(), 'href' => self::makeSpecialUrl( 'Userlogin', "$returnto&type=signup" ), 'active' => $title->isSpecial( 'Userlogin' ) && $is_signup, ); diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 8ed15c0ce1..68097e32b0 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -146,7 +146,7 @@ class UserloginTemplate extends BaseTemplate {
getMsg( 'login' )->text(), 'submit', array( + echo Html::input( 'wpLoginAttempt', $this->getMsg( 'pt-login' )->text(), 'submit', array( 'id' => 'wpLoginAttempt', 'tabindex' => '6', 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive' diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 421453beac..3fffec2374 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1254,6 +1254,9 @@ Please wait $1 before trying again.', 'suspicious-userlogout' => 'Your request to log out was denied because it looks like it was sent by a broken browser or caching proxy.', 'createacct-another-realname-tip' => 'Real name is optional. If you choose to provide it, this will be used for giving the user attribution for their work.', +'pt-createaccount' => 'Create account', +'pt-login' => 'Log in', +'pt-userlogout' => 'Log out', # Email sending 'pear-mail-error' => '$1', # do not translate or duplicate this message to other languages diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 60f01795ae..4004121b70 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1292,12 +1292,7 @@ See example: [[Special:UserLogin]]', 'yourdomainname' => 'Used as label for listbox.', 'password-change-forbidden' => 'Error message shown when an external authentication source does not allow the password to be changed.', 'externaldberror' => 'This message is thrown when a valid attempt to change the wiki password for a user fails because of a database error or an error from an external system.', -'login' => "Shown as the caption of the button at [[Special:UserLogin]], and also to anonymous users in the upper right corner of the page when they can't create an account (otherwise the message {{msg-mw|nav-login-createaccount}} is shown there). Also the title of the new login special page, which does not combine Log in & Create account. - -See also: -* {{msg-mw|Login}} -* {{msg-mw|Accesskey-pt-anonlogin}} -* {{msg-mw|Tooltip-pt-anonlogin}} +'login' => "{{Doc-special|UserLogin|unlisted=1}} {{Identical|Log in}}", 'nav-login-createaccount' => "Shown to anonymous users in the upper right corner of the page. When you can't create an account, the message {{msg-mw|login}} is shown. {{Identical|Log in / create account}}", @@ -1315,8 +1310,7 @@ See also: * {{msg-mw|Accesskey-pt-logout}} * {{msg-mw|Tooltip-pt-logout}} {{Identical|Log out}}', -'userlogout' => '{{Doc-actionlink}} -{{doc-special|UserLogout|unlisted=1}} +'userlogout' => '{{doc-special|UserLogout|unlisted=1}} {{Identical|Log out}}', 'notloggedin' => 'This message is displayed in the standard skin when not logged in. The message is placed above the login link in the top right corner of pages. @@ -1331,9 +1325,7 @@ See example: [[Special:UserLogin]]', {{Identical|Do not have an account}}', 'nologinlink' => 'Since 1.22 no longer used in core, but may be used by some extensions. DEPRECATED. {{Identical|Create an account}}', -'createaccount' => 'Used on the top of the page for logged out users, where it appears next to {{msg-mw|login}}, so consider making them similar. - -{{doc-special|CreateAccount}} +'createaccount' => '{{doc-special|CreateAccount|unlisted=1}} {{Identical|Create account}}', 'gotaccount' => 'Since 1.22 no longer used in core, but may be used by some extensions. DEPRECATED. Parameter: * $1 - a link to the log in form, and the text of it is {{msg-mw|Gotaccountlink}}', @@ -1585,6 +1577,13 @@ This message is used in html. 'createacct-another-realname-tip' => "{{doc-singularthey}} Used on the account creation form when creating another user's account. Similar to {{msg-mw|prefs-help-realname}}. {{Identical|Real name attribution}}", +'pt-login' => "Shown as the caption of the button at [[Special:UserLogin]], and also to anonymous users in the upper right corner of the page when they can't create an account (otherwise the message {{msg-mw|nav-login-createaccount}} is shown there) +{{Identical|Log in}}", +'pt-createaccount' => "Used on the top of the page for logged out users, where it appears next to {{msg-mw|login}}, so consider making them similar. +{{Identical|Create account}}", +'pt-userlogout' => "{{Doc-actionlink}} +{{Identical|Log out}} +", # Email sending 'php-mail-error-unknown' => 'Used as error message when mail() returned empty error message.', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 574b34e4be..eab6cf6766 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -558,6 +558,9 @@ $wgMessageStructure = array( 'loginlanguagelinks', 'suspicious-userlogout', 'createacct-another-realname-tip', + 'pt-login', + 'pt-createaccount', + 'pt-userlogout', ), 'mail' => array( 'pear-mail-error', -- 2.20.1