From: Siebrand Mazeland Date: Fri, 4 Oct 2013 00:29:58 +0000 (+0200) Subject: Support GENDER for "contribsub2" X-Git-Tag: 1.31.0-rc.0~18611 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=ebb45376df65392b78c23be813f1e34aa4eeadd4;p=lhc%2Fweb%2Fwiklou.git Support GENDER for "contribsub2" Also remove BC code that was added in MediaWiki 1.9. Spotted by Protnet at https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Blocklogentry/el/reply Change-Id: I37eefd1de95d6ef3429403cd351db315bc3ab2bf --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 614bd3ec41..65aa07e28c 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -267,19 +267,7 @@ class SpecialContributions extends SpecialPage { } } - // Old message 'contribsub' had one parameter, but that doesn't work for - // languages that want to put the "for" bit right after $user but before - // $links. If 'contribsub' is around, use it for reverse compatibility, - // otherwise use 'contribsub2'. - // @todo Should this be removed at some point? - $oldMsg = $this->msg( 'contribsub' ); - if ( $oldMsg->exists() ) { - $linksWithParentheses = $this->msg( 'parentheses' )->rawParams( $links )->escaped(); - - return $oldMsg->rawParams( "$user $linksWithParentheses" ); - } - - return $this->msg( 'contribsub2' )->rawParams( $user, $links ); + return $this->msg( 'contribsub2' )->rawParams( $user, $links )->params( $userObj->getName() ); } /** diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 28ca24b922..2cf1730dbe 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -482,16 +482,7 @@ class DeletedContributionsPage extends SpecialPage { } } - // Old message 'contribsub' had one parameter, but that doesn't work for - // languages that want to put the "for" bit right after $user but before - // $links. If 'contribsub' is around, use it for reverse compatibility, - // otherwise use 'contribsub2'. - $oldMsg = $this->msg( 'contribsub' ); - if ( $oldMsg->exists() ) { - return $oldMsg->rawParams( "$user ($links)" ); - } - - return $this->msg( 'contribsub2' )->rawParams( $user, $links ); + return $this->msg( 'contribsub2' )->rawParams( $user, $links )->params( $userObj->getName() ); } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 87f729f9a7..9cbe1e2c68 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3227,7 +3227,7 @@ $1', 'contributions-summary' => '', # do not translate or duplicate this message to other languages 'contributions-title' => 'User contributions for $1', 'mycontris' => 'Contributions', -'contribsub2' => 'For $1 ($2)', +'contribsub2' => 'For {{GENDER:$3|$1}} ($2)', 'nocontribs' => 'No changes were found matching these criteria.', 'uctop' => '(current)', 'month' => 'From month (and earlier):', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index e6b5ae3d81..23cf05f3c9 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -6030,10 +6030,9 @@ See also: * {{msg-mw|Tooltip-pt-mycontris}} {{Identical|Contribution}}', 'contribsub2' => 'Contributions for "user" (links). Parameters: -* $1 - any one of the following: -** IP address (if anonymous user) -** username, with a link which points to the user page (if registered user) -* $2 - list of tool links. The list contains a link which has text {{msg-mw|Sp-contributions-talk}} +* $1 is an IP address or a username, with a link which points to the user page (if registered user). +* $2 is list of tool links. The list contains a link which has text {{msg-mw|Sp-contributions-talk}}. +* $3 is a plain text username used for GENDER. {{Identical|For $1}}', 'nocontribs' => 'Used in [[Special:Contributions]] and [[Special:DeletedContributions]].