Index: trunk/extensions/UserRightsNotif/UserRightsNotif.php |
— | — | @@ -34,11 +34,11 @@ |
35 | 35 | } |
36 | 36 | |
37 | 37 | function efUserRightsNotifier( &$user, $added, $removed ) { |
38 | | - global $wgUserRightsNotif; |
| 38 | + global $wgUserRightsNotif, $wgContentLang; |
39 | 39 | if( $user->canReceiveEmail() ) { |
40 | 40 | global $wgUser, $wgSitename, $wgContLang; |
41 | | - $added = is_array( $added ) ? implode( ', ', $added ) : ''; |
42 | | - $removed = is_array( $removed ) ? implode( ', ', $removed ) : ''; |
| 41 | + $added = is_array( $added ) ? $wgContentLang->commaList( $added ) : ''; |
| 42 | + $removed = is_array( $removed ) ? $wgContentLang->commaList( $removed ) : ''; |
43 | 43 | $subject = wfMsg( 'userrightsnotifysubject', $wgSitename ); |
44 | 44 | $message = wfMsg( 'userrightsnotifybody', $user->getName(), $wgSitename, $wgUser->getName(), $wgContLang->timeAndDate( wfTimestampNow() ), $added, $removed ); |
45 | 45 | $user->sendMail( $subject, $message, $wgUserRightsNotif['sender'] ); |
Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -227,7 +227,7 @@ |
228 | 228 | * @param string $tag |
229 | 229 | */ |
230 | 230 | protected function doMassUserBlock( $users, $reason = '', $tag = '', $talkTag = '' ) { |
231 | | - global $wgOut, $wgUser, $wgCheckUserMaxBlocks; |
| 231 | + global $wgOut, $wgUser, $wgCheckUserMaxBlocks, $wgLang; |
232 | 232 | if( empty($users) || $wgUser->isBlocked(false) ) { |
233 | 233 | $wgOut->addWikiText( wfMsgExt('checkuser-block-failure',array('parsemag')) ); |
234 | 234 | return; |
— | — | @@ -239,12 +239,12 @@ |
240 | 240 | return; |
241 | 241 | } |
242 | 242 | $safeUsers = IPBlockForm::doMassUserBlock( $users, $reason, $tag, $talkTag ); |
243 | | - if( !empty($safeUsers) ) { |
244 | | - $n = count($safeUsers); |
245 | | - $ulist = implode(', ',$safeUsers); |
246 | | - $wgOut->addWikiText( wfMsgExt('checkuser-block-success',array('parsemag'),$ulist,$n) ); |
| 243 | + if( !empty( $safeUsers ) ) { |
| 244 | + $n = count( $safeUsers ); |
| 245 | + $ulist = $wgLang->listToText( $safeUsers ); |
| 246 | + $wgOut->addWikiText( wfMsgExt( 'checkuser-block-success', 'parsemag', $ulist, $wgLang->formatNum( $n ) ) ); |
247 | 247 | } else { |
248 | | - $wgOut->addWikiText( wfMsgExt('checkuser-block-failure',array('parsemag')) ); |
| 248 | + $wgOut->addWikiText( wfMsgExt( 'checkuser-block-failure', 'parsemag' ) ); |
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
— | — | @@ -884,7 +884,7 @@ |
885 | 885 | foreach( $user->getGroups() as $group ) { |
886 | 886 | $list[] = self::buildGroupLink( $group ); |
887 | 887 | } |
888 | | - $groups = implode( ', ', $list ); |
| 888 | + $groups = $wgLang->commaList( $list ); |
889 | 889 | if( $groups ) { |
890 | 890 | $flags[] = '<i>(' . $groups . ')</i>'; |
891 | 891 | } |
— | — | @@ -894,7 +894,7 @@ |
895 | 895 | $key = wfMemcKey( 'acctcreate', 'ip', $ip ); |
896 | 896 | $count = intval( $wgMemc->get( $key ) ); |
897 | 897 | if( $count ) { |
898 | | - $flags[] = '<strong>[' . wfMsgExt('checkuser-accounts',array('parsemag'),$count) . ']</strong>'; |
| 898 | + $flags[] = '<strong>[' . wfMsgExt( 'checkuser-accounts', 'parsemag', $wgLang->formatNum( $count ) . ']</strong>'; |
899 | 899 | } |
900 | 900 | } |
901 | 901 | $s .= implode(' ',$flags); |
Index: trunk/extensions/EmergencyDeSysop/SpecialEmergencyDeSysop.php |
— | — | @@ -96,10 +96,12 @@ |
97 | 97 | * @param array groups an array of user groups |
98 | 98 | */ |
99 | 99 | function formatGroups ( $groups ) { |
| 100 | + global $wgContentLang; |
| 101 | + |
100 | 102 | if( empty( $groups ) ) { |
101 | 103 | $groups = wfMsg( 'emergencydesysop-nogroups' ); |
102 | 104 | } else { |
103 | | - $groups = implode( ', ', $groups ); |
| 105 | + $groups = $wgContentLang->commaList( $groups ); |
104 | 106 | } |
105 | 107 | return $groups; |
106 | 108 | } |
— | — | @@ -175,12 +177,14 @@ |
176 | 178 | |
177 | 179 | //Log it |
178 | 180 | $log = new LogPage( "rights" ); |
| 181 | + // FIXME: Contains non-localisable text |
179 | 182 | $log->addEntry( |
180 | 183 | "rights", |
181 | | - $targetUser->getUserPage( ), |
182 | | - 'Emergency Desysop: ' . $wgRequest->getText( 'reason' ), |
| 184 | + $targetUser->getUserPage( ), |
| 185 | + 'Emergency Desysop: ' . $wgRequest->getText( 'reason' ), |
183 | 186 | array( $this->formatGroups( $targetUserGroupsOld ), $this->formatGroups( $targetUserGroupsNew ) ) ); |
184 | 187 | |
| 188 | + // FIXME: Contains non-localisable text |
185 | 189 | $log->addEntry( |
186 | 190 | "rights", |
187 | 191 | $wgUser->getUserPage( ), |
Index: trunk/extensions/SharedUserRights/SharedUserRights_body.php |
— | — | @@ -288,10 +288,12 @@ |
289 | 289 | } |
290 | 290 | |
291 | 291 | function makeGroupNameList( $ids ) { |
| 292 | + global $wgContentLang; |
| 293 | + |
292 | 294 | if ( empty( $ids ) ) { |
293 | 295 | return wfMsgForContent( 'rightsnone' ); |
294 | 296 | } else { |
295 | | - return implode( ', ', $ids ); |
| 297 | + return $wgContentLang->commaList( $ids ); |
296 | 298 | } |
297 | 299 | } |
298 | 300 | |
Index: trunk/extensions/Contributors/Contributors.page.php |
— | — | @@ -38,16 +38,18 @@ |
39 | 39 | |
40 | 40 | private function showInclude() { |
41 | 41 | wfProfileIn( __METHOD__ ); |
42 | | - global $wgOut; |
| 42 | + |
| 43 | + global $wgOut, $wgContentLang; |
| 44 | + |
43 | 45 | if( is_object( $this->target ) ) { |
44 | 46 | if( $this->target->exists() ) { |
45 | 47 | $names = array(); |
46 | 48 | list( $contributors, $others ) = $this->getMainContributors(); |
47 | 49 | foreach( $contributors as $username => $info ) |
48 | 50 | $names[] = $username; |
49 | | - $output = implode( ', ', $names ); |
| 51 | + $output = $wgContentLang->listToText( $names ); |
50 | 52 | if( $others > 0 ) |
51 | | - $output .= ' ' . wfMsgForContent( 'contributors-others', $others ); |
| 53 | + $output .= wgMsgForContent( 'word-separator' ) . wfMsgForContent( 'contributors-others', $wgContentLang->formatNum( $others ) ); |
52 | 54 | $wgOut->addHTML( htmlspecialchars( $output ) ); |
53 | 55 | } else { |
54 | 56 | $wgOut->addHTML( '<p>' . htmlspecialchars( wfMsgForContent( 'contributors-nosuchpage', $this->target->getPrefixedText() ) ) . '</p>' ); |
Index: trunk/extensions/EditMessages/EditMessages_body.php |
— | — | @@ -223,8 +223,10 @@ |
224 | 224 | |
225 | 225 | foreach ( $warnings as $warningType => $warnings2 ) { |
226 | 226 | if ( $warningsCount = count( $warnings2 ) ) { |
| 227 | + global $wgLang; |
| 228 | + |
227 | 229 | $wgOut->addWikiMsg( 'editmsg-warning-' . $warningType, |
228 | | - implode( ', ', $warnings2 ), $warningsCount ); |
| 230 | + $wgLang->commaList( $warnings2 ), $warningsCount ); |
229 | 231 | // is this really needed? |
230 | 232 | $warningsCount = 0; |
231 | 233 | } |
Index: trunk/extensions/Configure/SpecialViewConfig.php |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | foreach ( $wikis as $wiki ) { |
204 | 204 | $viewWikis[] = $skin->makeKnownLinkObj( $self, htmlspecialchars( $wiki ), "version={$ts}&wiki={$wiki}" ); |
205 | 205 | } |
206 | | - $view .= ' (' . implode( ', ', $viewWikis ) . ')'; |
| 206 | + $view .= ' (' . $wgLang->commaList( $viewWikis ) . ')'; |
207 | 207 | } |
208 | 208 | |
209 | 209 | if( $view ) |
— | — | @@ -222,7 +222,7 @@ |
223 | 223 | foreach ( $wikis as $wiki ) { |
224 | 224 | $viewWikis[] = $skin->makeKnownLinkObj( $configTitle, htmlspecialchars( $wiki ), "version={$ts}&wiki={$wiki}" ); |
225 | 225 | } |
226 | | - $editCore .= ' (' . implode( ', ', $viewWikis ) . ')'; |
| 226 | + $editCore .= ' (' . $wgLang->commaList( $viewWikis ) . ')'; |
227 | 227 | } |
228 | 228 | $actions[] = $editCore; |
229 | 229 | } |
— | — | @@ -240,7 +240,7 @@ |
241 | 241 | foreach ( $wikis as $wiki ) { |
242 | 242 | $viewWikis[] = $skin->makeKnownLinkObj( $extTitle, htmlspecialchars( $wiki ), "version={$ts}&wiki={$wiki}" ); |
243 | 243 | } |
244 | | - $editExt .= ' (' . implode( ', ', $viewWikis ) . ')'; |
| 244 | + $editExt .= ' (' . $wgLang->commaList( $viewWikis ) . ')'; |
245 | 245 | } |
246 | 246 | $actions[] = $editExt; |
247 | 247 | } |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | |
264 | 264 | $comment = $arr['reason'] ? $skin->commentBlock( $arr['reason'] ) : ''; |
265 | 265 | |
266 | | - $action = implode( ', ', $actions ); |
| 266 | + $action = $wgLang->commaList( $actions ); |
267 | 267 | return Xml::tags( 'li', null, wfMsgExt( 'configure-viewconfig-line', array( 'parseinline', 'replaceafter' ), array( $buttons, $time, $userLink, $action, $comment ) ) )."\n"; |
268 | 268 | } |
269 | 269 | |
Index: trunk/extensions/Configure/Configure.page.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | * @param $par Mixed: parameter passed to the page or null |
32 | 32 | */ |
33 | 33 | public function execute( $par ) { |
34 | | - global $wgUser, $wgRequest, $wgOut, $wgConf, $wgConfigureWikis; |
| 34 | + global $wgUser, $wgRequest, $wgOut, $wgConf, $wgConfigureWikis, $wgLang; |
35 | 35 | |
36 | 36 | $this->setHeaders(); |
37 | 37 | |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | } |
65 | 65 | if ( is_array( $wgConfigureWikis ) && !in_array( $wiki, $wgConfigureWikis ) ) { |
66 | 66 | $wgOut->wrapWikiMsg( '<div class="errorbox"><strong>$1</strong></div>', |
67 | | - array( 'configure-transwiki-not-in-range', $wiki, implode( ', ', $wgConfigureWikis ) ) ); |
| 67 | + array( 'configure-transwiki-not-in-range', $wiki, $wgLang->commaList( $wgConfigureWikis ) ) ); |
68 | 68 | return; |
69 | 69 | } |
70 | 70 | } |
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | } |
128 | 128 | |
129 | 129 | function formatRow( $row ) { |
130 | | - global $wgLang,$wgUser; |
| 130 | + global $wgLang, $wgUser; |
131 | 131 | |
132 | 132 | ## One-time setup |
133 | 133 | static $sk=null; |
— | — | @@ -198,11 +198,15 @@ |
199 | 199 | |
200 | 200 | ## Put it all together. |
201 | 201 | return Xml::openElement( 'li' ) . |
202 | | - wfMsgExt( 'globalblocking-list-blockitem', array( 'parseinline' ), $timestamp, |
203 | | - $user_display, $display_wiki, $row->gb_address, |
204 | | - implode( ', ', $options) ) . |
205 | | - ' ' . |
206 | | - implode( ' ', $info ) . |
| 202 | + wfMsgExt( 'globalblocking-list-blockitem', array( 'parseinline' ), |
| 203 | + $timestamp, |
| 204 | + $user_display, |
| 205 | + $display_wiki, |
| 206 | + $row->gb_address, |
| 207 | + $wgLang->commaList( $options) |
| 208 | + ) . |
| 209 | + ' ' . |
| 210 | + implode( ' ', $info ) . |
207 | 211 | Xml::closeElement( 'li' ); |
208 | 212 | } |
209 | 213 | |