Index: trunk/phase3/includes/SpecialMostrevisions.php |
— | — | @@ -42,14 +42,14 @@ |
43 | 43 | } |
44 | 44 | |
45 | 45 | function formatResult( $skin, $result ) { |
46 | | - global $wgContLang; |
| 46 | + global $wgLang, $wgContLang; |
47 | 47 | |
48 | 48 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
49 | 49 | $text = $wgContLang->convert( $nt->getPrefixedText() ); |
50 | 50 | |
51 | 51 | $plink = $skin->makeKnownLinkObj( $nt, $text ); |
52 | 52 | |
53 | | - $nl = wfMsg( 'nrevisions', $result->value ); |
| 53 | + $nl = wfMsg( 'nrevisions', $wgLang->formatNum( $result->value ) ); |
54 | 54 | $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' ); |
55 | 55 | |
56 | 56 | return wfSpecialList($plink, $nlink); |
Index: trunk/phase3/includes/SpecialMostimages.php |
— | — | @@ -38,14 +38,14 @@ |
39 | 39 | } |
40 | 40 | |
41 | 41 | function formatResult( $skin, $result ) { |
42 | | - global $wgContLang; |
| 42 | + global $wgLang, $wgContLang; |
43 | 43 | |
44 | 44 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
45 | 45 | $text = $wgContLang->convert( $nt->getPrefixedText() ); |
46 | 46 | |
47 | 47 | $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text ); |
48 | 48 | |
49 | | - $nl = wfMsg( 'nlinks', $result->value ); |
| 49 | + $nl = wfMsg( 'nlinks', $wgLang->formatNum ( $result->value ) ); |
50 | 50 | $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl ); |
51 | 51 | |
52 | 52 | return wfSpecialList($plink, $nlink); |
Index: trunk/phase3/includes/SpecialRecentchanges.php |
— | — | @@ -502,25 +502,22 @@ |
503 | 503 | $note = wfMsg( 'rcnote', $wgLang->formatNum( $options['limit'] ), $wgLang->formatNum( $options['days'] ), $wgLang->timeAndDate( wfTimestampNow(), true ) ); |
504 | 504 | |
505 | 505 | // limit links |
506 | | - $cl = ''; |
507 | 506 | $options_limit = array(50, 100, 250, 500); |
508 | | - $i = 0; |
509 | | - while ( $i+1 < count($options_limit) ) { |
510 | | - $cl .= makeOptionsLink( $options_limit[$i], array( 'limit' => $options_limit[$i] ), $nondefaults) . ' | ' ; |
511 | | - $i++; |
| 507 | + foreach( $options_limit as $value ) { |
| 508 | + $cl[] = makeOptionsLink( $wgLang->formatNum( $value ), |
| 509 | + array( 'limit' => $value ), $nondefaults) ; |
512 | 510 | } |
513 | | - $cl .= makeOptionsLink( $options_limit[$i], array( 'limit' => $options_limit[$i] ), $nondefaults) ; |
| 511 | + $cl = implode( ' | ', $cl); |
514 | 512 | |
515 | 513 | // day links, reset 'from' to none |
516 | | - $dl = ''; |
517 | 514 | $options_days = array(1, 3, 7, 14, 30); |
518 | | - $i = 0; |
519 | | - while ( $i+1 < count($options_days) ) { |
520 | | - $dl .= makeOptionsLink( $options_days[$i], array( 'days' => $options_days[$i], 'from' => '' ), $nondefaults) . ' | ' ; |
521 | | - $i++; |
| 515 | + foreach( $options_days as $value ) { |
| 516 | + $dl[] = makeOptionsLink( $wgLang->formatNum( $value ), |
| 517 | + array( 'days' => $value, 'from' => '' ), $nondefaults) ; |
522 | 518 | } |
523 | | - $dl .= makeOptionsLink( $options_days[$i], array( 'days' => $options_days[$i], 'from' => '' ), $nondefaults) ; |
| 519 | + $dl = implode( ' | ', $dl); |
524 | 520 | |
| 521 | + |
525 | 522 | // show/hide links |
526 | 523 | $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' )); |
527 | 524 | $minorLink = makeOptionsLink( $showhide[1-$options['hideminor']], |
Index: trunk/phase3/includes/SpecialMostlinked.php |
— | — | @@ -77,9 +77,11 @@ |
78 | 78 | * @return string |
79 | 79 | */ |
80 | 80 | function formatResult( $skin, $result ) { |
| 81 | + global $wgLang; |
81 | 82 | $title = Title::makeTitleSafe( $result->namespace, $result->title ); |
82 | 83 | $link = $skin->makeLinkObj( $title ); |
83 | | - $wlh = $this->makeWlhLink( $title, wfMsgHtml( 'nlinks', $result->value ), $skin ); |
| 84 | + $wlh = $this->makeWlhLink( $title, wfMsgHtml( 'nlinks', |
| 85 | + $wgLang->formatNum( $result->value ) ), $skin ); |
84 | 86 | return wfSpecialList( $link, $wlh ); |
85 | 87 | } |
86 | 88 | } |
Index: trunk/phase3/includes/SpecialMIMEsearch.php |
— | — | @@ -72,7 +72,8 @@ |
73 | 73 | $download = $skin->makeMediaLink( $nt->getText(), 'fuck me!', wfMsgHtml( 'download' ) ); |
74 | 74 | $bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'), |
75 | 75 | $wgLang->formatNum( $result->img_size ) ); |
76 | | - $dimensions = wfMsg( 'widthheight', $result->img_width, $result->img_height ); |
| 76 | + $dimensions = wfMsg( 'widthheight', $wgLang->formatNum( $result->img_width ), |
| 77 | + $wgLang->formatNum( $result->img_height ) ); |
77 | 78 | $user = $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text ); |
78 | 79 | $time = $wgLang->timeanddate( $result->img_timestamp ); |
79 | 80 | |
Index: trunk/phase3/includes/SpecialMostlinkedcategories.php |
— | — | @@ -57,14 +57,14 @@ |
58 | 58 | } |
59 | 59 | |
60 | 60 | function formatResult( $skin, $result ) { |
61 | | - global $wgContLang; |
| 61 | + global $wgLang, $wgContLang; |
62 | 62 | |
63 | 63 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
64 | 64 | $text = $wgContLang->convert( $nt->getText() ); |
65 | 65 | |
66 | 66 | $plink = $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ); |
67 | 67 | |
68 | | - $nlinks = wfMsg( 'members', $result->value ); |
| 68 | + $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->value ) ); |
69 | 69 | return wfSpecialList($plink, $nlinks); |
70 | 70 | } |
71 | 71 | } |
Index: trunk/phase3/includes/SpecialCategories.php |
— | — | @@ -50,9 +50,10 @@ |
51 | 51 | } |
52 | 52 | |
53 | 53 | function formatResult( $skin, $result ) { |
| 54 | + global $wgLang; |
54 | 55 | $title = Title::makeTitle( NS_CATEGORY, $result->title ); |
55 | 56 | $plink = $skin->makeLinkObj( $title, $title->getText() ); |
56 | | - $nlinks = wfMsg( 'members', $result->count ); |
| 57 | + $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->count ) ); |
57 | 58 | return wfSpecialList($plink, $nlinks); |
58 | 59 | } |
59 | 60 | } |
Index: trunk/phase3/includes/SpecialWantedcategories.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | } |
61 | 61 | |
62 | 62 | function formatResult( $skin, $result ) { |
63 | | - global $wgContLang; |
| 63 | + global $wgLang, $wgContLang; |
64 | 64 | |
65 | 65 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
66 | 66 | $text = $wgContLang->convert( $nt->getText() ); |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) : |
70 | 70 | $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) ); |
71 | 71 | |
72 | | - $nlinks = wfMsg( 'members', $result->value ); |
| 72 | + $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->value ) ); |
73 | 73 | return wfSpecialList($plink, $nlinks); |
74 | 74 | } |
75 | 75 | } |
Index: trunk/phase3/includes/SpecialWantedpages.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | |
73 | 73 | |
74 | 74 | function formatResult( $skin, $result ) { |
75 | | - global $wgContLang; |
| 75 | + global $wgLang; |
76 | 76 | |
77 | 77 | $title = Title::makeTitleSafe( $result->namespace, $result->title ); |
78 | 78 | |
— | — | @@ -91,8 +91,9 @@ |
92 | 92 | |
93 | 93 | # Make a link to "what links here" if it's required |
94 | 94 | $wlhLink = $this->nlinks |
95 | | - ? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) ) |
96 | | - : ""; |
| 95 | + ? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', |
| 96 | + $wgLang->formatNum( $result->value ) ) ) |
| 97 | + : null; |
97 | 98 | |
98 | 99 | return wfSpecialList($pageLink, $wlhLink); |
99 | 100 | } |
— | — | @@ -106,7 +107,7 @@ |
107 | 108 | */ |
108 | 109 | function makeWlhLink( &$title, &$skin, $text ) { |
109 | 110 | $wlhTitle = Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' ); |
110 | | - return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() ); |
| 111 | + return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() ); |
111 | 112 | } |
112 | 113 | |
113 | 114 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -226,6 +226,7 @@ |
227 | 227 | * (bug 5858) Update for Russian language (ru) |
228 | 228 | * (bug 5860) Update for Indonesian language (id) |
229 | 229 | * (bug 1120) Update for Czech language (Cs) |
| 230 | +* Added many missing formatNum calls |
230 | 231 | |
231 | 232 | == Compatibility == |
232 | 233 | |