r103180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103179‎ | r103180 | r103181 >
Date:15:27, 15 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r103164

Improve message further, add PLURAL also
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.i18n.php (modified) (history)
  • /trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php
@@ -429,13 +429,18 @@
430430 }
431431
432432 function formatEditcount( $row ) {
 433+ $wiki = WikiMap::getWiki( $row['wiki'] );
 434+ if ( !$wiki ) {
 435+ throw new MWException( "Invalid wiki: {$row['wiki']}" );
 436+ }
 437+ $wikiname = $wiki->getDisplayName();
433438 global $wgLang;
434439 $editCount = $wgLang->formatNum( intval( $row['editCount'] ) );
435440 return $this->foreignLink(
436441 $row['wiki'],
437442 'Special:Contributions/' . $this->mUserName,
438443 $editCount,
439 - wfMsg( 'centralauth-foreign-contributions', $editCount )
 444+ wfMsgExt( 'centralauth-foreign-contributions', 'parseinline', $editCount, $wikiname )
440445 );
441446 }
442447
@@ -467,8 +472,9 @@
468473 }
469474
470475 $url = $wiki->getUrl( $title );
471 - if ( $params )
 476+ if ( $params ) {
472477 $url .= '?' . $params;
 478+ }
473479 return Xml::element( 'a',
474480 array(
475481 'href' => $url,
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php
@@ -91,7 +91,7 @@
9292 'centralauth-list-unattached' => 'The account "$1" could not be automatically confirmed as belonging to you on the following sites;
9393 most likely they have a different password from your primary account:',
9494 'centralauth-foreign-link' => 'User $1 on $2',
95 - 'centralauth-foreign-contributions' => '$1 contributions',
 95+ 'centralauth-foreign-contributions' => '$1 {{PLURAL:$1|contribution|contributions}} on $2',
9696
9797 // Merge methods
9898 'centralauth-merge-method-primary' => 'home wiki',
@@ -415,7 +415,8 @@
416416 *$2 is the name of the local wiki',
417417 'centralauth-foreign-contributions' => 'Tool tip in list of local accounts (on the edit count column) on [http://meta.wikimedia.org/w/index.php?title=Special%3ACentralAuth&target=Siebrand Global user manager] special page.
418418
419 - *$1 is the number of contributions',
 419+ *$1 is the number of contributions
 420+ *$2 is the name of the local wiki',
420421 'centralauth-merge-method-primary' => '{{Identical|Home wiki}}',
421422 'centralauth-merge-method-mail' => 'Tool tip in list of local accounts on [http://meta.wikimedia.org/w/index.php?title=Special%3ACentralAuth&target=Siebrand Global user manager] special page.',
422423 'centralauth-merge-method-password' => 'Tool tip in list of local accounts on [http://meta.wikimedia.org/w/index.php?title=Special%3ACentralAuth&target=Siebrand Global user manager] special page.',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103164Bug 32429 - The “contributions” tooltip on [[Special:CentralAuth]] is not...reedy13:13, 15 November 2011

Status & tagging log