r47439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47438‎ | r47439 | r47440 >
Date:09:55, 18 February 2009
Author:siebrand
Status:ok
Tags:
Comment:
Format number, and allow use of plural for 'move-subpages' and 'move-talk-subpages'. This allows for "(up to $1 {{PLURAL:$2|page|pages}}" or whichever construct is required for a correct message in a language.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -235,16 +235,19 @@
236236
237237 if( ($this->oldTitle->hasSubpages() || $this->oldTitle->getTalkPage()->hasSubpages())
238238 && $this->oldTitle->userCan( 'move-subpages' ) ) {
239 - global $wgMaximumMovedPages;
 239+ global $wgMaximumMovedPages, $wgLang;
240240
241241 $wgOut->addHTML( "
242242 <tr>
243243 <td></td>
244244 <td class=\"mw-input\">" .
245 - Xml::checkLabel( wfMsg(
 245+ Xml::checkLabel( wfMsgExt(
246246 ( $this->oldTitle->hasSubpages()
247 - ? 'move-subpages'
248 - : 'move-talk-subpages' ),
 247+ ? 'move-subpages'
 248+ : 'move-talk-subpages' ),
 249+ array( 'parsemag' ),
 250+ $wgLang->formatNum( $wgMaximumMovedPages ),
 251+ # $2 to allow use of PLURAL in message.
249252 $wgMaximumMovedPages
250253 ),
251254 'wpMovesubpages', 'wpMovesubpages',

Status & tagging log