jenkins-bot has submitted this change and it was merged.

Change subject: Merge 'passwordreset-pretext' and 'passwordreset-text' messages
......................................................................


Merge 'passwordreset-pretext' and 'passwordreset-text' messages

It is confusing to have in the same two messages which can be interpreted
with different meanings. When there is more than one way of resetting a
password, two messages are being show to the user:
- 'passwordreset-pretext' saying to fill only one of the fields below
- 'passwordreset-text' saying to *complete* the form, which people
  can interpret as "fill all the fields below"

This already got changed at the English Wikipedia, see
https://en.wikipedia.org/wiki/Wikipedia:MediaWiki_messages/Archive_5#Special:PasswordReset_improvements
I think it's worth changing MediaWiki too.

Change-Id: Ia2f0c889959d11396411ba44ae595ffad5d498d2
---
M includes/specials/SpecialPasswordReset.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
4 files changed, 14 insertions(+), 11 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialPasswordReset.php 
b/includes/specials/SpecialPasswordReset.php
index fd46c03..3b67554 100644
--- a/includes/specials/SpecialPasswordReset.php
+++ b/includes/specials/SpecialPasswordReset.php
@@ -103,11 +103,8 @@
        }
 
        public function alterForm( HTMLForm $form ) {
-               $form->setSubmitTextMsg( 'mailmypassword' );
-       }
-
-       protected function preText() {
                global $wgPasswordResetRoutes;
+
                $i = 0;
                if ( isset( $wgPasswordResetRoutes['username'] ) && 
$wgPasswordResetRoutes['username'] ) {
                        $i++;
@@ -119,7 +116,10 @@
                        $i++;
                }
 
-               return $this->msg( 'passwordreset-pretext', $i 
)->parseAsBlock();
+               $message = ( $i > 1 ) ? 'passwordreset-text-many' : 
'passwordreset-text-one';
+
+               $form->setHeaderText( $this->msg( $message, $i 
)->parseAsBlock() );
+               $form->setSubmitTextMsg( 'mailmypassword' );
        }
 
        /**
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index bc3a381..7d632ff 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1275,11 +1275,11 @@
 
 # Special:PasswordReset
 'passwordreset'                    => 'Reset password',
-'passwordreset-text'               => 'Complete this form to reset your 
password.',
+'passwordreset-text-one'           => 'Complete this form to reset your 
password.',
+'passwordreset-text-many'          => '{{PLURAL:$1|Enter one of the pieces of 
data to reset your password.}}',
 'passwordreset-legend'             => 'Reset password',
 'passwordreset-disabled'           => 'Password resets have been disabled on 
this wiki.',
 'passwordreset-emaildisabled'      => 'Email features have been disabled on 
this wiki.',
-'passwordreset-pretext'            => '{{PLURAL:$1||Enter one of the pieces of 
data below}}',
 'passwordreset-username'           => 'Username:',
 'passwordreset-domain'             => 'Domain:',
 'passwordreset-capture'            => 'View the resulting email?',
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index e789898..6cd4acc 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -1348,7 +1348,10 @@
 # Special:PasswordReset
 'passwordreset' => 'Title of [[Special:PasswordReset]].
 {{Identical|Reset password}}',
-'passwordreset-text' => 'Text on [[Special:PasswordReset]]',
+'passwordreset-text-one' => 'Text on [[Special:PasswordReset]] that appears 
when there is only one way of resetting the password.',
+'passwordreset-text-many' => 'Text on [[Special:PasswordReset]] that appears 
when there are multiple ways of resetting the password.
+
+* $1 is the number of password reset routes.',
 'passwordreset-legend' => '{{Identical|Reset password}}',
 'passwordreset-disabled' => 'Used as error message in changing password.',
 'passwordreset-emaildisabled' => "Used as error message in changing password 
when site's email feature is disabled.",
@@ -8684,7 +8687,7 @@
 'specialpages-group-media' => '{{doc-special-group|like=[[Special:FilePath]], 
[[Special:MIMESearch]] and [[Special:Upload]]}}',
 'specialpages-group-users' => 
'{{doc-special-group|like=[[Special:ActiveUsers]], [[Special:Contributions]] 
and [[Special:ListGroupRights]]}}',
 'specialpages-group-highuse' => 
'{{doc-special-group|like=[[Special:MostCategories]], [[Special:MostLinked]] 
and [[Special:MostRevisions]]}}',
-'specialpages-group-pages' => '{{doc-special-group|like=[[Special:AllPages]], 
[[Special:PrefixIndex]], [[Special:Categories]], 
+'specialpages-group-pages' => '{{doc-special-group|like=[[Special:AllPages]], 
[[Special:PrefixIndex]], [[Special:Categories]],
 [[Special:Disambiguations]], etc}}',
 'specialpages-group-pagetools' => 
'{{doc-special-group|like=[[Special:MovePage]], [[Special:Undelete]], 
[[Special:WhatLinksHere]], [[Special:Export]] etc}}',
 'specialpages-group-wiki' => '{{doc-special-group|like=[[Special:Version]], 
[[Special:Statistics]], [[Special:LockDB]], etc}}',
diff --git a/maintenance/language/messages.inc 
b/maintenance/language/messages.inc
index fdd37e6..25d7bf4 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -584,11 +584,11 @@
        ),
        'passwordreset' => array(
                'passwordreset',
-               'passwordreset-text',
+               'passwordreset-text-one',
+               'passwordreset-text-many',
                'passwordreset-legend',
                'passwordreset-disabled',
                'passwordreset-emaildisabled',
-               'passwordreset-pretext',
                'passwordreset-username',
                'passwordreset-domain',
                'passwordreset-capture',

-- 
To view, visit https://gerrit.wikimedia.org/r/59806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2f0c889959d11396411ba44ae595ffad5d498d2
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to