r69361 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69360‎ | r69361 | r69362 >
Date:23:16, 14 July 2010
Author:demon
Status:ok
Tags:
Comment:
(bug 24334) Use $wgLang->formatNum() on a bunch of special pages
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/ReviewedPages_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php
@@ -111,18 +111,18 @@
112112 // After three days, just use days
113113 if ( $hours > ( 3 * 24 ) ) {
114114 $days = round( $hours / 24, 0 );
115 - $age = ' ' . wfMsgExt( 'unreviewed-days', array( 'parsemag' ), $days );
 115+ $age = ' ' . wfMsgExt( 'unreviewed-days', array( 'parsemag' ), $wgLang->formatNum( $days ) );
116116 // If one or more hours, use hours
117117 } elseif ( $hours >= 1 ) {
118118 $hours = round( $hours, 0 );
119 - $age = ' ' . wfMsgExt( 'unreviewed-hours', array( 'parsemag' ), $hours );
 119+ $age = ' ' . wfMsgExt( 'unreviewed-hours', array( 'parsemag' ), $wgLang->formatNum( $hours ) );
120120 } else {
121121 $age = ' ' . wfMsg( 'unreviewed-recent' ); // hot off the press :)
122122 }
123123 if ( $wgUser->isAllowed( 'unwatchedpages' ) ) {
124124 $uw = self::usersWatching( $title );
125125 $watching = $uw
126 - ? wfMsgExt( 'unreviewed-watched', array( 'parsemag' ), $uw )
 126+ ? wfMsgExt( 'unreviewed-watched', array( 'parsemag' ), $wgLang->formatNum( $uw ) )
127127 : wfMsgHtml( 'unreviewed-unwatched' );
128128 $watching = " $watching"; // Oh-noes!
129129 } else {
Index: trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php
@@ -96,7 +96,7 @@
9797 $wgOut->addHTML( $form );
9898 # Add list output
9999 $num = $pager->getNumRows();
100 - $wgOut->addHTML( wfMsgExt( 'oldreviewedpages-list', array( 'parse' ), $num ) );
 100+ $wgOut->addHTML( wfMsgExt( 'oldreviewedpages-list', array( 'parse' ), $wgLang->formatNum( $num ) ) );
101101 if ( $num ) {
102102 $wgOut->addHTML( $pager->getNavigationBar() );
103103 $wgOut->addHTML( $pager->getBody() );
@@ -221,7 +221,7 @@
222222 if ( !$this->including() && $wgUser->isAllowed( 'unreviewedpages' ) ) {
223223 $uw = UnreviewedPages::usersWatching( $title );
224224 $watching = $uw
225 - ? wfMsgExt( 'oldreviewedpages-watched', 'parsemag', $uw )
 225+ ? wfMsgExt( 'oldreviewedpages-watched', 'parsemag', $wgLang->formatNum( $uw ) )
226226 : wfMsgHtml( 'oldreviewedpages-unwatched' );
227227 $watching = " {$watching}";
228228 } else {
@@ -237,11 +237,11 @@
238238 // After three days, just use days
239239 if ( $hours > ( 3 * 24 ) ) {
240240 $days = round( $hours / 24, 0 );
241 - $age = wfMsgExt( 'oldreviewedpages-days', array( 'parsemag' ), $days );
 241+ $age = wfMsgExt( 'oldreviewedpages-days', array( 'parsemag' ), $wgLang->formatNum( $days ) );
242242 // If one or more hours, use hours
243243 } elseif ( $hours >= 1 ) {
244244 $hours = round( $hours, 0 );
245 - $age = wfMsgExt( 'oldreviewedpages-hours', array( 'parsemag' ), $hours );
 245+ $age = wfMsgExt( 'oldreviewedpages-hours', array( 'parsemag' ), $wgLang->formatNum( $hours ) );
246246 } else {
247247 $age = wfMsg( 'oldreviewedpages-recent' ); // hot off the press :)
248248 }
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php
@@ -197,7 +197,7 @@
198198 if ( !$this->including() && $wgUser->isAllowed( 'unreviewedpages' ) ) {
199199 $uw = UnreviewedPages::usersWatching( $title );
200200 $watching = $uw
201 - ? wfMsgExt( 'oldreviewedpages-watched', 'parsemag', $uw )
 201+ ? wfMsgExt( 'oldreviewedpages-watched', 'parsemag', $wgLang->formatNum( $uw ) )
202202 : wfMsgHtml( 'oldreviewedpages-unwatched' );
203203 $watching = " {$watching}";
204204 } else {
@@ -213,11 +213,11 @@
214214 // After three days, just use days
215215 if ( $hours > ( 3 * 24 ) ) {
216216 $days = round( $hours / 24, 0 );
217 - $age = wfMsgExt( 'oldreviewedpages-days', array( 'parsemag' ), $days );
 217+ $age = wfMsgExt( 'oldreviewedpages-days', array( 'parsemag' ), $wgLang->formatNum( $days ) );
218218 // If one or more hours, use hours
219219 } elseif ( $hours >= 1 ) {
220220 $hours = round( $hours, 0 );
221 - $age = wfMsgExt( 'oldreviewedpages-hours', array( 'parsemag' ), $hours );
 221+ $age = wfMsgExt( 'oldreviewedpages-hours', array( 'parsemag' ), $wgLang->formatNum( $hours ) );
222222 } else {
223223 $age = wfMsg( 'oldreviewedpages-recent' ); // hot off the press :)
224224 }
Index: trunk/extensions/FlaggedRevs/specialpages/ReviewedPages_body.php
@@ -71,7 +71,7 @@
7272 if ( $num ) {
7373 // Text to explain level select (if there are several levels)
7474 if ( FlaggedRevs::qualityVersions() ) {
75 - $wgOut->addHTML( wfMsgExt( 'reviewedpages-list', array( 'parse' ), $num ) );
 75+ $wgOut->addHTML( wfMsgExt( 'reviewedpages-list', array( 'parse' ), $wgLang->formatNum( $num ) ) );
7676 }
7777 $wgOut->addHTML( $pager->getNavigationBar() );
7878 $wgOut->addHTML( $pager->getBody() );

Status & tagging log