Support GENDER for "contribsub2"
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Fri, 4 Oct 2013 00:29:58 +0000 (02:29 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Fri, 4 Oct 2013 08:13:15 +0000 (10:13 +0200)
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

includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index 614bd3e..65aa07e 100644 (file)
@@ -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() );
        }
 
        /**
index 28ca24b..2cf1730 100644 (file)
@@ -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() );
        }
 
        /**
index 87f729f..9cbe1e2 100644 (file)
@@ -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):',
index e6b5ae3..23cf05f 100644 (file)
@@ -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]].