r47536 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47535‎ | r47536 | r47537 >
Date:10:29, 20 February 2009
Author:ialex
Status:ok
Tags:
Comment:
Per siebrand and Nikerabbit (tweak for r47535):
* Reworded movesubpagetext to include the number of subpages
* Fix spelling error in movesnoubpage
* Allow plural in movesubpage
Modified paths:
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -499,20 +499,23 @@
500500 }
501501
502502 function showSubpages( $title, $out ) {
503 - global $wgUser;
 503+ global $wgUser, $wgLang;
504504
505505 if( !MWNamespace::hasSubpages( $title->getNamespace() ) )
506506 return;
507507
508 - $out->wrapWikiMsg( '== $1 ==', 'movesubpage' );
509508 $subpages = $title->getSubpages();
 509+ $count = $subpages instanceof TitleArray ? $subpages->count() : 0;
510510
 511+ $out->wrapWikiMsg( '== $1 ==', array( 'movesubpage', $count ) );
 512+
511513 # No subpages.
512 - if ( !( $subpages instanceof TitleArray ) || $subpages->count() == 0 ) {
 514+ if ( $count == 0 ) {
513515 $out->addWikiMsg( 'movenosubpage' );
514516 return;
515517 }
516518
 519+ $out->addWikiMsg( 'movesubpagetext', $wgLang->formatnum( $count ) );
517520 $skin = $wgUser->getSkin();
518521 $out->addHTML( "<ul>\n" );
519522
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2769,8 +2769,8 @@
27702770 'movelogpage' => 'Move log',
27712771 'movelogpagetext' => 'Below is a list of all page moves.',
27722772 'movesubpage' => 'Subpages',
2773 -'movesubpagetext' => 'Below is a list of subpages.',
2774 -'movenosubpage' => 'This page has no subpage.',
 2773+'movesubpagetext' => 'This page has $1 {{PLURAL:$1|subpage|subpages}} shown below.',
 2774+'movenosubpage' => 'This page has no subpages.',
27752775 'movereason' => 'Reason:',
27762776 'revertmove' => 'revert',
27772777 'delete_and_move' => 'Delete and move',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r47535OOPS, completely forgot to add new messages in r47469ialex10:02, 20 February 2009

Status & tagging log