(bug 32237) Add GENDER support to Special:EmailUser
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sun, 28 Oct 2012 20:19:23 +0000 (22:19 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 29 Oct 2012 10:15:35 +0000 (11:15 +0100)
Change-Id: Ie72cc90518c6f5880632fe17d4c60f392e3ddec6

includes/specials/SpecialEmailuser.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index 4d875e6..9a42c09 100644 (file)
@@ -139,7 +139,8 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                $this->mTargetObj = $ret;
 
                $form = new HTMLForm( $this->getFormFields(), $this->getContext() );
-               $form->addPreText( $this->msg( 'emailpagetext' )->parse() );
+               // By now we are supposed to be sure that $this->mTarget is a user name
+               $form->addPreText( $this->msg( 'emailpagetext', $this->mTarget )->parse() );
                $form->setSubmitTextMsg( 'emailsend' );
                $form->setTitle( $this->getTitle() );
                $form->setSubmitCallback( array( __CLASS__, 'uiSubmit' ) );
index 5b8987a..fcdefda 100644 (file)
@@ -2807,7 +2807,8 @@ There may be [[{{MediaWiki:Listgrouprights-helppage}}|additional information]] a
 'emailuser-title-notarget' => 'E-mail user',
 'emailuser-summary'        => '', # do not translate or duplicate this message to other languages
 'emailpage'                => 'E-mail user',
-'emailpagetext'            => 'You can use the form below to send an e-mail message to this user.
+// Dummy GENDER to prevent warnings at translatewiki
+'emailpagetext'            => 'You can use the form below to send an e-mail message to this {{GENDER:$1|user}}.
 The e-mail address you entered in [[Special:Preferences|your user preferences]] will appear as the "From" address of the e-mail, so the recipient will be able to reply directly to you.',
 'usermailererror'          => 'Mail object returned error:',
 'defemailsubject'          => '{{SITENAME}} e-mail from user "$1"',
index d88763b..0a952de 100644 (file)
@@ -2654,7 +2654,8 @@ See also {{msg-mw|listgrouprights-addgroup-all}}.',
 'emailpage' => "Title of special page [[Special:EmailUser]], when it is the destination of the sidebar link {{msg-mw|Emailuser}} on a user's page.",
 'emailpagetext' => 'This is the text that is displayed above the e-mail form on [[Special:EmailUser]].
 
-Special:EmailUser appears when you click on the link "E-mail this user" in the sidebar, but only if there is an e-mail address in the recipient\'s user preferences. If there isn\'t then the message [[Mediawiki:Noemailtext]] will appear instead of Special:EmailUser.',
+Special:EmailUser appears when you click on the link "E-mail this user" in the sidebar, but only if there is an e-mail address in the recipient\'s user preferences. If there isn\'t then the message [[Mediawiki:Noemailtext]] will appear instead of Special:EmailUser. Parameters:
+* $1 can be used for GENDER.',
 'defemailsubject' => 'The default subject of EmailUser emails. Parameters:
 * $1 is the username of the user sending the email and can be used for GENDER.',
 'usermaildisabled' => 'Caption for an error message ({{msg-mw|Usermaildisabledtext}}) shown when the user-to-user e-mail feature is disabled on the wiki (see [[mw:Manual:$wgEnableEmail]], [[mw:Manual:$wgEnableUserEmail]]).',