r40953 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40952‎ | r40953 | r40954 >
Date:09:41, 17 September 2008
Author:siebrand
Status:old
Tags:
Comment:
(bug 7509) Don't hardcode separation strings, make them configurable
* Introduced message 'pipe-separator' to replace many occurrence of " | ". No changes made in skin "Nostalgia".
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/PageHistory.php (modified) (history)
  • /trunk/phase3/includes/Pager.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/WatchlistEditor.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialAllmessages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialAllpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPrefixindex.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)
  • /trunk/phase3/skins/Standard.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -3416,6 +3416,7 @@
34173417 'comma-separator' => ', ', # only translate this message to other languages if you have to change it
34183418 'colon-separator' => ': ', # only translate this message to other languages if you have to change it
34193419 'autocomment-prefix' => '- ', # only translate this message to other languages if you have to change it
 3420+'pipe-separator' => ' | ', # only translate this message to other languages if you have to change it
34203421
34213422 # Multipage image navigation
34223423 'imgmultipageprev' => '← previous page',
Index: trunk/phase3/maintenance/language/messages.inc
@@ -2549,6 +2549,7 @@
25502550 'comma-separator',
25512551 'colon-separator',
25522552 'autocomment-prefix',
 2553+ 'pipe-separator',
25532554 ),
25542555 'imgmulti' => array(
25552556 'imgmultipageprev',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -314,6 +314,7 @@
315315 'comma-separator',
316316 'colon-separator',
317317 'autocomment-prefix',
 318+ 'pipe-separator',
318319 'listgrouprights-right-display',
319320 'timezone-utc',
320321 'whatlinkshere-backlink',
Index: trunk/phase3/skins/CologneBlue.php
@@ -79,9 +79,10 @@
8080 }
8181 $s .= "<td class='bottom' align='center' valign='top'>";
8282
 83+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
8384 $s .= $this->bottomLinks();
84 - $s .= "\n<br />" . $this->makeKnownLinkObj( Title::newMainPage() ) . " | "
85 - . $this->aboutLink() . " | "
 85+ $s .= "\n<br />" . $this->makeKnownLinkObj( Title::newMainPage() ) . $separator
 86+ . $this->aboutLink() . $separator
8687 . $this->searchForm( wfMsg( "qbfind" ) );
8788
8889 $s .= "\n<br />" . $this->pageStats();
@@ -132,22 +133,19 @@
133134 $q = "returnto={$rt}";
134135 }
135136
 137+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
136138 $s = "" .
137 - $this->mainPageLink()
138 - . " | " .
139 - $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) )
140 - . " | " .
141 - $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) )
142 - . " | " .
143 - $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") )
144 - . " | " .
 139+ $this->mainPageLink(). $separator .
 140+ $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) ) . $separator .
 141+ $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) ) . $separator .
 142+ $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") ) . $separator .
145143 $this->specialLink( "specialpages" );
146144
147145 /* show links to different language variants */
148146 $s .= $this->variantLinks();
149147 $s .= $this->extensionTabLinks();
150148
151 - $s .= " | ";
 149+ $s .= $separator;
152150 if ( $wgUser->isLoggedIn() ) {
153151 $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
154152 } else {
Index: trunk/phase3/skins/Standard.php
@@ -107,11 +107,13 @@
108108 $l = $wgContLang->isRTL() ? 'right' : 'left';
109109 $s .= "<td class='bottom' align='$l' valign='top'>";
110110
 111+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 112+
111113 $s .= $this->bottomLinks();
112114 $s .= "\n<br />" . $this->mainPageLink()
113 - . ' | ' . $this->aboutLink()
114 - . ' | ' . $this->specialLink( 'recentchanges' )
115 - . ' | ' . $this->searchForm()
 115+ . $separator . $this->aboutLink()
 116+ . $separator . $this->specialLink( 'recentchanges' )
 117+ . $separator . $this->searchForm()
116118 . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
117119
118120 $s .= "</td>";
Index: trunk/phase3/includes/GlobalFunctions.php
@@ -926,10 +926,12 @@
927927 } else {
928928 $nlink = '<a href="' . $title->escapeLocalUrl( $q ) . "\" class=\"mw-nextlink\">{$next}</a>";
929929 }
930 - $nums = wfNumLink( $offset, 20, $title, $query ) . ' | ' .
931 - wfNumLink( $offset, 50, $title, $query ) . ' | ' .
932 - wfNumLink( $offset, 100, $title, $query ) . ' | ' .
933 - wfNumLink( $offset, 250, $title, $query ) . ' | ' .
 930+
 931+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 932+ $nums = wfNumLink( $offset, 20, $title, $query ) . $separator .
 933+ wfNumLink( $offset, 50, $title, $query ) . $separator .
 934+ wfNumLink( $offset, 100, $title, $query ) . $separator .
 935+ wfNumLink( $offset, 250, $title, $query ) . $separator .
934936 wfNumLink( $offset, 500, $title, $query );
935937
936938 return wfMsg( 'viewprevnext', $plink, $nlink, $nums );
Index: trunk/phase3/includes/Pager.php
@@ -513,7 +513,8 @@
514514
515515 $pagingLinks = $this->getPagingLinks( $linkTexts );
516516 $limitLinks = $this->getLimitLinks();
517 - $limits = implode( ' | ', $limitLinks );
 517+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 518+ $limits = implode( $separator, $limitLinks );
518519
519520 $this->mNavigationBar =
520521 "({$pagingLinks['first']} | {$pagingLinks['last']}) " .
@@ -532,7 +533,7 @@
533534 if( $first ) {
534535 $first = false;
535536 } else {
536 - $extra .= ' | ';
 537+ $extra .= $separator;
537538 }
538539
539540 if( $order == $this->mOrderType ) {
@@ -591,11 +592,12 @@
592593 'last' => wfMsgHtml( 'histfirst' )
593594 );
594595
 596+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
595597 $pagingLinks = $this->getPagingLinks( $linkTexts );
596598 $limitLinks = $this->getLimitLinks();
597 - $limits = implode( ' | ', $limitLinks );
 599+ $limits = implode( $separator, $limitLinks );
598600
599 - $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " .
 601+ $this->mNavigationBar = "({$pagingLinks['first']}" . $separator . "{$pagingLinks['last']}) " .
600602 wfMsgHtml("viewprevnext", $pagingLinks['prev'], $pagingLinks['next'], $limits);
601603 return $this->mNavigationBar;
602604 }
Index: trunk/phase3/includes/PageHistory.php
@@ -379,7 +379,7 @@
380380 }
381381
382382 if( $tools ) {
383 - $s .= ' (' . implode( ' | ', $tools ) . ')';
 383+ $s .= ' (' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools ) . ')';
384384 }
385385
386386 wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row , &$s ) );
Index: trunk/phase3/includes/WatchlistEditor.php
@@ -391,7 +391,7 @@
392392 }
393393 return '<li>'
394394 . Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
395 - . $link . ' (' . implode( ' | ', $tools ) . ')' . '</li>';
 395+ . $link . ' (' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools ) . ')' . '</li>';
396396 }
397397
398398 /**
@@ -457,6 +457,6 @@
458458 foreach( $modes as $mode => $subpage ) {
459459 $tools[] = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Watchlist', $subpage ), wfMsgHtml( "watchlisttools-{$mode}" ) );
460460 }
461 - return implode( ' | ', $tools );
 461+ return implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools );
462462 }
463463 }
Index: trunk/phase3/includes/specials/SpecialAllpages.php
@@ -328,6 +328,8 @@
329329 }
330330 }
331331
 332+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 333+
332334 if ( $this->including() ) {
333335 $out2 = '';
334336 } else {
@@ -382,7 +384,7 @@
383385 . ( $namespace ? '&namespace=' . $namespace : '' );
384386 $prevLink = $sk->makeKnownLinkObj( $self,
385387 wfMsgHTML( 'prevpage', htmlspecialchars( $pt ) ), $q );
386 - $out2 .= ' | ' . $prevLink;
 388+ $out2 .= $separator . $prevLink;
387389 }
388390
389391 if( $n == $this->maxPerPage && $s = $res->fetchObject() ) {
@@ -392,7 +394,7 @@
393395 . ( $namespace ? '&namespace=' . $namespace : '' );
394396 $nextLink = $sk->makeKnownLinkObj( $self,
395397 wfMsgHtml( 'nextpage', htmlspecialchars( $t->getText() ) ), $q );
396 - $out2 .= ' | ' . $nextLink;
 398+ $out2 .= $separator . $nextLink;
397399 }
398400 $out2 .= "</td></tr></table><hr />";
399401 }
@@ -404,7 +406,7 @@
405407 $wgOut->addHTML( $prevLink );
406408 }
407409 if( isset( $prevLink ) && isset( $nextLink ) ) {
408 - $wgOut->addHTML( ' | ' );
 410+ $wgOut->addHTML( $separator );
409411 }
410412 if( isset( $nextLink ) ) {
411413 $wgOut->addHTML( $nextLink );
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -634,7 +634,7 @@
635635 $this->tableRow(
636636 wfMsgExt( 'prefs-memberingroups', array( 'parseinline' ), count( $userEffectiveGroupsArray ) ),
637637 implode( wfMsg( 'comma-separator' ), $userEffectiveGroupsArray ) .
638 - '<br />(' . implode( ' | ', $toolLinks ) . ')'
 638+ '<br />(' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $toolLinks ) . ')'
639639 ) .
640640
641641 $this->tableRow(
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -271,7 +271,7 @@
272272 # Namespace filter and put the whole form together.
273273 $form .= $wlInfo;
274274 $form .= $cutofflinks;
275 - $form .= implode( ' | ', $links );
 275+ $form .= implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links );
276276 $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
277277 $form .= '<p>';
278278 $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . '&nbsp;';
@@ -382,10 +382,11 @@
383383 foreach( $days as $d ) {
384384 $days[$i++] = wlDaysLink( $d, $page, $options );
385385 }
 386+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
386387 return wfMsgExt('wlshowlast',
387388 array('parseinline', 'replaceafter'),
388 - implode(' | ', $hours),
389 - implode(' | ', $days),
 389+ implode( $separator, $hours ),
 390+ implode( $separator, $days ),
390391 wlDaysLink( 0, $page, $options ) );
391392 }
392393
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -148,7 +148,7 @@
149149 $links[$key] = wfMsgHtml( $msg, $link );
150150 }
151151
152 - return implode( ' | ', $links );
 152+ return implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links );
153153 }
154154
155155 protected function form() {
Index: trunk/phase3/includes/specials/SpecialPrefixindex.php
@@ -175,7 +175,7 @@
176176 wfMsg ( 'allpages' ) );
177177 if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
178178 $namespaceparam = $namespace ? "&namespace=$namespace" : "";
179 - $out2 .= " | " . $sk->makeKnownLinkObj(
 179+ $out2 .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . $sk->makeKnownLinkObj(
180180 $self,
181181 wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ),
182182 "from=" . wfUrlEncode( $s->page_title ) .
Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -457,7 +457,7 @@
458458 $links[] = $skin->makeLink ( 'MediaWiki:Ipbreason-dropdown', wfMsgHtml( 'ipb-edit-dropdown' ) );
459459 $links[] = $this->getUnblockLink( $skin );
460460 $links[] = $this->getBlockListLink( $skin );
461 - return '<p class="mw-ipb-conveniencelinks">' . implode( ' | ', $links ) . '</p>';
 461+ return '<p class="mw-ipb-conveniencelinks">' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links ) . '</p>';
462462 }
463463
464464 /**
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -970,7 +970,7 @@
971971 $links[] = $this->makeLanguageSelectorLink( $parts[0], $parts[1] );
972972 }
973973 }
974 - return count( $links ) > 0 ? wfMsgHtml( 'loginlanguagelabel', implode( ' | ', $links ) ) : '';
 974+ return count( $links ) > 0 ? wfMsgHtml( 'loginlanguagelabel', implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links ) ) : '';
975975 } else {
976976 return '';
977977 }
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -340,7 +340,7 @@
341341 $limitLinks[] = $this->makeSelfLink( $prettyLimit, wfArrayToCGI( $overrides, $changed ) );
342342 }
343343
344 - $nums = implode ( ' | ', $limitLinks );
 344+ $nums = implode ( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $limitLinks );
345345
346346 return wfMsgHtml( 'viewprevnext', $prev, $next, $nums );
347347 }
@@ -403,6 +403,6 @@
404404 $overrides = array( $type => !$chosen );
405405 $links[] = $this->makeSelfLink( $msg, wfArrayToCGI( $overrides, $changed ) );
406406 }
407 - return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), implode( '&nbsp;|&nbsp;', $links ) );
 407+ return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links ) );
408408 }
409409 }
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -618,14 +618,16 @@
619619 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
620620 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ;
621621 }
622 - $cl = implode( ' | ', $cl );
623622
 623+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 624+ $cl = implode( $separator, $cl );
 625+
624626 // day links, reset 'from' to none
625627 foreach( $wgRCLinkDays as $value ) {
626628 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
627629 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ;
628630 }
629 - $dl = implode( ' | ', $dl );
 631+ $dl = implode( $separator, $dl );
630632
631633
632634 // show/hide links
@@ -650,7 +652,7 @@
651653 if( $wgUser->useRCPatrol() )
652654 $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink );
653655 $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink );
654 - $hl = implode( ' | ', $links );
 656+ $hl = implode( $separator, $links );
655657
656658 // show from this onward link
657659 $now = $wgLang->timeanddate( wfTimestampNow(), true );
Index: trunk/phase3/includes/specials/SpecialAllmessages.php
@@ -45,7 +45,8 @@
4646 $wgOut->addScriptFile( 'allmessages.js' );
4747 if ( $ot == 'php' ) {
4848 $navText .= wfAllMessagesMakePhp( $messages );
49 - $wgOut->addHTML( 'PHP | <a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a> | ' .
 49+ $wgOut->addHTML( 'PHP | <a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a>' .
 50+ wfMsgExt( 'pipe-separator' , 'escapenoentities' ) .
5051 '<a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' .
5152 '<pre>' . htmlspecialchars( $navText ) . '</pre>' );
5253 } else if ( $ot == 'xml' ) {
@@ -53,8 +54,9 @@
5455 header( 'Content-type: text/xml' );
5556 echo wfAllMessagesMakeXml( $messages );
5657 } else {
57 - $wgOut->addHTML( '<a href="' . $wgTitle->escapeLocalUrl( 'ot=php' ) . '">PHP</a> | ' .
58 - 'HTML | <a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' );
 58+ $wgOut->addHTML( '<a href="' . $wgTitle->escapeLocalUrl( 'ot=php' ) . '">PHP</a>' .
 59+ wfMsgExt( 'pipe-separator' , 'escapenoentities' ) .
 60+ 'HTML' . wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . '<a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' );
5961 $wgOut->addWikiText( $navText );
6062 $wgOut->addHTML( wfAllMessagesMakeHTMLText( $messages ) );
6163 }
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -338,7 +338,7 @@
339339
340340 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
341341
342 - $links = implode( ' | ', $tools );
 342+ $links = implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools );
343343 }
344344
345345 // Old message 'contribsub' had one parameter, but that doesn't work for
Index: trunk/phase3/includes/Skin.php
@@ -913,14 +913,15 @@
914914 $diff = $wgRequest->getVal( 'diff' );
915915 $action = $wgRequest->getText( 'action' );
916916
 917+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
917918 $s = $this->printableLink();
918919 $disclaimer = $this->disclaimerLink(); # may be empty
919920 if( $disclaimer ) {
920 - $s .= ' | ' . $disclaimer;
 921+ $s .= $separator . $disclaimer;
921922 }
922923 $privacy = $this->privacyLink(); # may be empty too
923924 if( $privacy ) {
924 - $s .= ' | ' . $privacy;
 925+ $s .= $separator . $privacy;
925926 }
926927
927928 if ( $wgOut->isArticleRelated() ) {
@@ -930,12 +931,12 @@
931932 if( $image ) {
932933 $link = htmlspecialchars( $image->getURL() );
933934 $style = $this->getInternalLinkAttributes( $link, $name );
934 - $s .= " | <a href=\"{$link}\"{$style}>{$name}</a>";
 935+ $s .= $separator . "<a href=\"{$link}\"{$style}>{$name}</a>";
935936 }
936937 }
937938 }
938939 if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
939 - $s .= ' | ' . $this->makeKnownLinkObj( $wgTitle,
 940+ $s .= $separator . $this->makeKnownLinkObj( $wgTitle,
940941 wfMsg( 'currentrev' ) );
941942 }
942943
@@ -945,7 +946,7 @@
946947 if( !$wgTitle->equals( $wgUser->getTalkPage() ) ) {
947948 $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), wfMsgHtml( 'newmessageslink' ), 'redirect=no' );
948949 $dl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), wfMsgHtml( 'newmessagesdifflink' ), 'diff=cur' );
949 - $s.= ' | <strong>'. wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
 950+ $s.= $separator . '<strong>'. wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
950951 # disable caching
951952 $wgOut->setSquidMaxage(0);
952953 $wgOut->enableClientCache(false);
@@ -954,7 +955,7 @@
955956
956957 $undelete = $this->getUndeleteLink();
957958 if( !empty( $undelete ) ) {
958 - $s .= ' | '.$undelete;
 959+ $s .= $separator . $undelete;
959960 }
960961 return $s;
961962 }
@@ -987,7 +988,7 @@
988989 if( $wgOut->isSyndicated() ) {
989990 foreach( $wgFeedClasses as $format => $class ) {
990991 $feedurl = $wgRequest->escapeAppendQuery( "feed=$format" );
991 - $s .= " | <a href=\"$feedurl\">{$format}</a>";
 992+ $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . "<a href=\"$feedurl\">{$format}</a>";
992993 }
993994 }
994995 return $s;
@@ -1035,7 +1036,7 @@
10361037 $getlink = $this->makeKnownLinkObj( $linkObj, htmlspecialchars( $display ) );
10371038 $c++;
10381039 if ($c>1) {
1039 - $subpages .= ' | ';
 1040+ $subpages .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
10401041 } else {
10411042 $subpages .= '&lt; ';
10421043 }
@@ -1102,9 +1103,9 @@
11031104 SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
11041105 array(), array( 'returnto' => $returnTo )
11051106 );
1106 - $ret .= ' | ' . $this->specialLink( 'preferences' );
 1107+ $ret .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . $this->specialLink( 'preferences' );
11071108 }
1108 - $ret .= ' | ' . $this->link(
 1109+ $ret .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . $this->link(
11091110 Title::newFromText( wfMsgForContent( 'helppage' ) ),
11101111 wfMsg( 'help' )
11111112 );
@@ -1170,7 +1171,7 @@
11711172 $s = '';
11721173 wfRunHooks( 'SkinTemplateTabs', array( $this, &$tabs ) );
11731174 foreach( $tabs as $tab ) {
1174 - $s .= ' | ' . Xml::element( 'a',
 1175+ $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . Xml::element( 'a',
11751176 array( 'href' => $tab['href'] ),
11761177 $tab['text'] );
11771178 }
@@ -1191,7 +1192,7 @@
11921193 $varname = $wgContLang->getVariantname( $code );
11931194 if( $varname == 'disable' )
11941195 continue;
1195 - $s .= ' | <a href="' . $wgTitle->escapeLocalUrl( 'variant=' . $code ) . '">' . htmlspecialchars( $varname ) . '</a>';
 1196+ $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . '<a href="' . $wgTitle->escapeLocalUrl( 'variant=' . $code ) . '">' . htmlspecialchars( $varname ) . '</a>';
11961197 }
11971198 }
11981199 return $s;
@@ -1622,7 +1623,7 @@
16231624 $first = true;
16241625 if($wgContLang->isRTL()) $s .= '<span dir="LTR">';
16251626 foreach( $a as $l ) {
1626 - if ( ! $first ) { $s .= ' | '; }
 1627+ if ( ! $first ) { $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ); }
16271628 $first = false;
16281629
16291630 $nt = Title::newFromText( $l );
Index: trunk/phase3/includes/Linker.php
@@ -1062,7 +1062,7 @@
10631063 }
10641064
10651065 if( $items ) {
1066 - return ' (' . implode( ' | ', $items ) . ')';
 1066+ return ' (' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $items ) . ')';
10671067 } else {
10681068 return '';
10691069 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r40997Revert r40953 '(bug 7509) Don't hardcode separation strings, make them config...brion17:11, 18 September 2008
r47046(bug 7509) Separation strings should be configurable...siebrand17:48, 9 February 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r16824(bug 7509) Make back arrow in Special:Whatlinkshere editable through Mediawik...collinj23:13, 6 October 2006