Index: trunk/phase3/includes/WatchlistEditor.php |
— | — | @@ -407,6 +407,8 @@ |
408 | 408 | * @return string |
409 | 409 | */ |
410 | 410 | private function buildRemoveLine( $title, $redirect, $skin ) { |
| 411 | + global $wgLang; |
| 412 | + |
411 | 413 | $link = $skin->makeLinkObj( $title ); |
412 | 414 | if( $redirect ) |
413 | 415 | $link = '<span class="watchlistredir">' . $link . '</span>'; |
— | — | @@ -419,7 +421,7 @@ |
420 | 422 | } |
421 | 423 | return "<li>" |
422 | 424 | . Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) ) |
423 | | - . $link . " (" . implode( ' | ', $tools ) . ")" . "</li>\n"; |
| 425 | + . $link . " (" . $wgLang->pipeList( $tools ) . ")" . "</li>\n"; |
424 | 426 | } |
425 | 427 | |
426 | 428 | /** |
— | — | @@ -480,11 +482,13 @@ |
481 | 483 | * @return string |
482 | 484 | */ |
483 | 485 | public static function buildTools( $skin ) { |
| 486 | + global $wgLang; |
| 487 | + |
484 | 488 | $tools = array(); |
485 | 489 | $modes = array( 'view' => false, 'edit' => 'edit', 'raw' => 'raw' ); |
486 | 490 | foreach( $modes as $mode => $subpage ) { |
487 | 491 | $tools[] = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Watchlist', $subpage ), wfMsgHtml( "watchlisttools-{$mode}" ) ); |
488 | 492 | } |
489 | | - return implode( ' | ', $tools ); |
| 493 | + return $wgLang->pipeList( $tools ); |
490 | 494 | } |
491 | 495 | } |
Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -257,7 +257,7 @@ |
258 | 258 | * @param string $to list all pages to this name (default FALSE) |
259 | 259 | */ |
260 | 260 | function showChunk( $namespace = NS_MAIN, $from = false, $to = false ) { |
261 | | - global $wgOut, $wgUser, $wgContLang; |
| 261 | + global $wgOut, $wgUser, $wgContLang, $wgLang; |
262 | 262 | |
263 | 263 | $sk = $wgUser->getSkin(); |
264 | 264 | |
— | — | @@ -382,7 +382,7 @@ |
383 | 383 | . ( $namespace ? '&namespace=' . $namespace : '' ); |
384 | 384 | $prevLink = $sk->makeKnownLinkObj( $self, |
385 | 385 | wfMsgHTML( 'prevpage', htmlspecialchars( $pt ) ), $q ); |
386 | | - $out2 .= ' | ' . $prevLink; |
| 386 | + $out2 = $wgLang->pipeList( array( $out2, $prevLink ) ); |
387 | 387 | } |
388 | 388 | |
389 | 389 | if( $n == $this->maxPerPage && $s = $res->fetchObject() ) { |
— | — | @@ -392,7 +392,7 @@ |
393 | 393 | . ( $namespace ? '&namespace=' . $namespace : '' ); |
394 | 394 | $nextLink = $sk->makeKnownLinkObj( $self, |
395 | 395 | wfMsgHtml( 'nextpage', htmlspecialchars( $t->getText() ) ), $q ); |
396 | | - $out2 .= ' | ' . $nextLink; |
| 396 | + $out2 = $wgLang->pipeList( array( $out2, $nextLink ) ); |
397 | 397 | } |
398 | 398 | $out2 .= "</td></tr></table>"; |
399 | 399 | } |
— | — | @@ -404,7 +404,7 @@ |
405 | 405 | $wgOut->addHTML( $prevLink ); |
406 | 406 | } |
407 | 407 | if( isset( $prevLink ) && isset( $nextLink ) ) { |
408 | | - $wgOut->addHTML( ' | ' ); |
| 408 | + $wgOut->addHTML( wfMsgExt( 'pipe-separator' , 'escapenoentities' ) ); |
409 | 409 | } |
410 | 410 | if( isset( $nextLink ) ) { |
411 | 411 | $wgOut->addHTML( $nextLink ); |
Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | */ |
12 | 12 | function wfSpecialAllmessages() { |
13 | 13 | global $wgOut, $wgRequest, $wgMessageCache, $wgTitle; |
14 | | - global $wgUseDatabaseMessages; |
| 14 | + global $wgUseDatabaseMessages, $wgLang; |
15 | 15 | |
16 | 16 | # The page isn't much use if the MediaWiki namespace is not being used |
17 | 17 | if( !$wgUseDatabaseMessages ) { |
— | — | @@ -49,16 +49,22 @@ |
50 | 50 | $wgOut->addScriptFile( 'allmessages.js' ); |
51 | 51 | if ( $ot == 'php' ) { |
52 | 52 | $navText .= wfAllMessagesMakePhp( $messages ); |
53 | | - $wgOut->addHTML( 'PHP | <a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a> | ' . |
| 53 | + $wgOut->addHTML( $wgLang->pipeList( array( |
| 54 | + 'PHP', |
| 55 | + '<a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a>', |
54 | 56 | '<a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' . |
55 | | - '<pre>' . htmlspecialchars( $navText ) . '</pre>' ); |
| 57 | + '<pre>' . htmlspecialchars( $navText ) . '</pre>' |
| 58 | + ) ) ); |
56 | 59 | } else if ( $ot == 'xml' ) { |
57 | 60 | $wgOut->disable(); |
58 | 61 | header( 'Content-type: text/xml' ); |
59 | 62 | echo wfAllMessagesMakeXml( $messages ); |
60 | 63 | } else { |
61 | | - $wgOut->addHTML( '<a href="' . $wgTitle->escapeLocalUrl( 'ot=php' ) . '">PHP</a> | ' . |
62 | | - 'HTML | <a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' ); |
| 64 | + $wgOut->addHTML( $wgLang->pipeList( array( |
| 65 | + '<a href="' . $wgTitle->escapeLocalUrl( 'ot=php' ) . '">PHP</a>', |
| 66 | + 'HTML', |
| 67 | + '<a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' |
| 68 | + ) ) ); |
63 | 69 | $wgOut->addWikiText( $navText ); |
64 | 70 | $wgOut->addHTML( wfAllMessagesMakeHTMLText( $messages ) ); |
65 | 71 | } |
Index: trunk/phase3/includes/specials/SpecialNewpages.php |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | } |
124 | 124 | |
125 | 125 | protected function filterLinks() { |
126 | | - global $wgGroupPermissions, $wgUser; |
| 126 | + global $wgGroupPermissions, $wgUser, $wgLang; |
127 | 127 | |
128 | 128 | // show/hide links |
129 | 129 | $showhide = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) ); |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | $links[$key] = wfMsgHtml( $msg, $link ); |
157 | 157 | } |
158 | 158 | |
159 | | - return implode( ' | ', $links ); |
| 159 | + return $wgLang->pipeList( $links ); |
160 | 160 | } |
161 | 161 | |
162 | 162 | protected function form() { |
Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -679,7 +679,7 @@ |
680 | 680 | $this->tableRow( |
681 | 681 | wfMsgExt( 'prefs-memberingroups', array( 'parseinline' ), count( $userEffectiveGroupsArray ) ), |
682 | 682 | $wgLang->commaList( $userEffectiveGroupsArray ) . |
683 | | - '<br />(' . implode( ' | ', $toolLinks ) . ')' |
| 683 | + '<br />(' . $wgLang->pipeList( $toolLinks ) . ')' |
684 | 684 | ) . |
685 | 685 | |
686 | 686 | $this->tableRow( |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -969,6 +969,8 @@ |
970 | 970 | * @return string |
971 | 971 | */ |
972 | 972 | function makeLanguageSelector() { |
| 973 | + global $wgLang; |
| 974 | + |
973 | 975 | $msg = wfMsgForContent( 'loginlanguagelinks' ); |
974 | 976 | if( $msg != '' && !wfEmptyMsg( 'loginlanguagelinks', $msg ) ) { |
975 | 977 | $langs = explode( "\n", $msg ); |
— | — | @@ -980,7 +982,7 @@ |
981 | 983 | $links[] = $this->makeLanguageSelectorLink( $parts[0], $parts[1] ); |
982 | 984 | } |
983 | 985 | } |
984 | | - return count( $links ) > 0 ? wfMsgHtml( 'loginlanguagelabel', implode( ' | ', $links ) ) : ''; |
| 986 | + return count( $links ) > 0 ? wfMsgHtml( 'loginlanguagelabel', $wgLang->pipeList( $links ) ) : ''; |
985 | 987 | } else { |
986 | 988 | return ''; |
987 | 989 | } |
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php |
— | — | @@ -340,7 +340,7 @@ |
341 | 341 | $limitLinks[] = $this->makeSelfLink( $prettyLimit, wfArrayToCGI( $overrides, $changed ) ); |
342 | 342 | } |
343 | 343 | |
344 | | - $nums = implode ( ' | ', $limitLinks ); |
| 344 | + $nums = $wgLang->pipeList( $limitLinks ); |
345 | 345 | |
346 | 346 | return wfMsgHtml( 'viewprevnext', $prev, $next, $nums ); |
347 | 347 | } |
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -622,14 +622,14 @@ |
623 | 623 | $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ), |
624 | 624 | array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ; |
625 | 625 | } |
626 | | - $cl = implode( ' | ', $cl ); |
| 626 | + $cl = $wgLang->pipeList( $cl ); |
627 | 627 | |
628 | 628 | // day links, reset 'from' to none |
629 | 629 | foreach( $wgRCLinkDays as $value ) { |
630 | 630 | $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ), |
631 | 631 | array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ; |
632 | 632 | } |
633 | | - $dl = implode( ' | ', $dl ); |
| 633 | + $dl = $wgLang->pipeList( $dl ); |
634 | 634 | |
635 | 635 | |
636 | 636 | // show/hide links |
— | — | @@ -654,7 +654,7 @@ |
655 | 655 | if( $wgUser->useRCPatrol() ) |
656 | 656 | $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink ); |
657 | 657 | $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink ); |
658 | | - $hl = implode( ' | ', $links ); |
| 658 | + $hl = $wgLang->pipeList( $links ); |
659 | 659 | |
660 | 660 | // show from this onward link |
661 | 661 | $now = $wgLang->timeanddate( wfTimestampNow(), true ); |
Index: trunk/phase3/includes/specials/SpecialPrefixindex.php |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | * @param string $from list all pages from this name (default FALSE) |
92 | 92 | */ |
93 | 93 | function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null ) { |
94 | | - global $wgOut, $wgUser, $wgContLang; |
| 94 | + global $wgOut, $wgUser, $wgContLang, $wgLang; |
95 | 95 | |
96 | 96 | $sk = $wgUser->getSkin(); |
97 | 97 | |
— | — | @@ -175,11 +175,14 @@ |
176 | 176 | wfMsg ( 'allpages' ) ); |
177 | 177 | if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) { |
178 | 178 | $namespaceparam = $namespace ? "&namespace=$namespace" : ""; |
179 | | - $out2 .= " | " . $sk->makeKnownLinkObj( |
180 | | - $self, |
181 | | - wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ), |
182 | | - "from=" . wfUrlEncode( $s->page_title ) . |
183 | | - "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam ); |
| 179 | + $out2 = $wgLang->pipeList( array( |
| 180 | + $out2, |
| 181 | + $sk->makeKnownLinkObj( |
| 182 | + $self, |
| 183 | + wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ), |
| 184 | + "from=" . wfUrlEncode( $s->page_title ) . |
| 185 | + "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam ) |
| 186 | + ) ); |
184 | 187 | } |
185 | 188 | $out2 .= "</td></tr></table>"; |
186 | 189 | } |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -190,7 +190,7 @@ |
191 | 191 | |
192 | 192 | wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) ); |
193 | 193 | |
194 | | - $links = implode( ' | ', $tools ); |
| 194 | + $links = $wgLang->pipeList( $tools ); |
195 | 195 | } |
196 | 196 | |
197 | 197 | // Old message 'contribsub' had one parameter, but that doesn't work for |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -526,14 +526,14 @@ |
527 | 527 | * @return string |
528 | 528 | */ |
529 | 529 | private function getConvenienceLinks() { |
530 | | - global $wgUser; |
| 530 | + global $wgUser, $wgLang; |
531 | 531 | $skin = $wgUser->getSkin(); |
532 | 532 | if( $this->BlockAddress ) |
533 | 533 | $links[] = $this->getContribsLink( $skin ); |
534 | 534 | $links[] = $this->getUnblockLink( $skin ); |
535 | 535 | $links[] = $this->getBlockListLink( $skin ); |
536 | 536 | $links[] = $skin->makeLink ( 'MediaWiki:Ipbreason-dropdown', wfMsgHtml( 'ipb-edit-dropdown' ) ); |
537 | | - return '<p class="mw-ipb-conveniencelinks">' . implode( ' | ', $links ) . '</p>'; |
| 537 | + return '<p class="mw-ipb-conveniencelinks">' . $wgLang->pipeList( $links ) . '</p>'; |
538 | 538 | } |
539 | 539 | |
540 | 540 | /** |
Index: trunk/phase3/includes/specials/SpecialWatchlist.php |
— | — | @@ -286,7 +286,7 @@ |
287 | 287 | # Namespace filter and put the whole form together. |
288 | 288 | $form .= $wlInfo; |
289 | 289 | $form .= $cutofflinks; |
290 | | - $form .= implode( ' | ', $links ); |
| 290 | + $form .= $wgLang->pipeList( $links ); |
291 | 291 | $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) ); |
292 | 292 | $form .= '<hr /><p>'; |
293 | 293 | $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' '; |
— | — | @@ -389,6 +389,8 @@ |
390 | 390 | * Returns html |
391 | 391 | */ |
392 | 392 | function wlCutoffLinks( $days, $page = 'Watchlist', $options = array() ) { |
| 393 | + global $wgLang; |
| 394 | + |
393 | 395 | $hours = array( 1, 2, 6, 12 ); |
394 | 396 | $days = array( 1, 3, 7 ); |
395 | 397 | $i = 0; |
— | — | @@ -401,8 +403,8 @@ |
402 | 404 | } |
403 | 405 | return wfMsgExt('wlshowlast', |
404 | 406 | array('parseinline', 'replaceafter'), |
405 | | - implode(' | ', $hours), |
406 | | - implode(' | ', $days), |
| 407 | + $wgLang->pipeList( $hours ), |
| 408 | + $wgLang->pipeList( $days ), |
407 | 409 | wlDaysLink( 0, $page, $options ) ); |
408 | 410 | } |
409 | 411 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -154,6 +154,7 @@ |
155 | 155 | * (bug 17190) User ID on preference page no longer has delimeters |
156 | 156 | * (bug 17341) "Powered by MediaWiki" should be on the left on RTL wikis |
157 | 157 | * (bug 17404) "userrights-interwiki" right was missing in User::$mCoreRights |
| 158 | +* (bug 7509) Separation strings should be configurable |
158 | 159 | |
159 | 160 | == API changes in 1.15 == |
160 | 161 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |