From 3141337d77504b52045406c540a371f3444d40fc Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 20 Feb 2009 10:29:44 +0000 Subject: [PATCH] Per siebrand and Nikerabbit (tweak for r47535): * Reworded movesubpagetext to include the number of subpages * Fix spelling error in movesnoubpage * Allow plural in movesubpage --- includes/specials/SpecialMovepage.php | 9 ++++++--- languages/messages/MessagesEn.php | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index d7a8eaa0f0..ea839d528e 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -499,20 +499,23 @@ class MovePageForm { } function showSubpages( $title, $out ) { - global $wgUser; + global $wgUser, $wgLang; if( !MWNamespace::hasSubpages( $title->getNamespace() ) ) return; - $out->wrapWikiMsg( '== $1 ==', 'movesubpage' ); $subpages = $title->getSubpages(); + $count = $subpages instanceof TitleArray ? $subpages->count() : 0; + + $out->wrapWikiMsg( '== $1 ==', array( 'movesubpage', $count ) ); # No subpages. - if ( !( $subpages instanceof TitleArray ) || $subpages->count() == 0 ) { + if ( $count == 0 ) { $out->addWikiMsg( 'movenosubpage' ); return; } + $out->addWikiMsg( 'movesubpagetext', $wgLang->formatnum( $count ) ); $skin = $wgUser->getSkin(); $out->addHTML( "