This seems to make code much uglier and harder to maintain -- there are a bajillion new calls to "wfMsgExt( 'pipe-separator' , 'escapenoentities' )" which is not trivial or easy to remember. This makes code uglier, harder to read, harder to maintain, and more prone to error.
} else {
$nlink = '<a href="' . $title->escapeLocalUrl( $q ) . "\" class=\"mw-nextlink\">{$next}</a>";
}
-
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
- $nums = wfNumLink( $offset, 20, $title, $query ) . $separator .
- wfNumLink( $offset, 50, $title, $query ) . $separator .
- wfNumLink( $offset, 100, $title, $query ) . $separator .
- wfNumLink( $offset, 250, $title, $query ) . $separator .
+ $nums = wfNumLink( $offset, 20, $title, $query ) . ' | ' .
+ wfNumLink( $offset, 50, $title, $query ) . ' | ' .
+ wfNumLink( $offset, 100, $title, $query ) . ' | ' .
+ wfNumLink( $offset, 250, $title, $query ) . ' | ' .
wfNumLink( $offset, 500, $title, $query );
return wfMsg( 'viewprevnext', $plink, $nlink, $nums );
}
if( $items ) {
- return ' (' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $items ) . ')';
+ return ' (' . implode( ' | ', $items ) . ')';
} else {
return '';
}
}
if( $tools ) {
- $s .= ' (' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools ) . ')';
+ $s .= ' (' . implode( ' | ', $tools ) . ')';
}
wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row , &$s ) );
$pagingLinks = $this->getPagingLinks( $linkTexts );
$limitLinks = $this->getLimitLinks();
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
- $limits = implode( $separator, $limitLinks );
+ $limits = implode( ' | ', $limitLinks );
$this->mNavigationBar =
"({$pagingLinks['first']} | {$pagingLinks['last']}) " .
if( $first ) {
$first = false;
} else {
- $extra .= $separator;
+ $extra .= ' | ';
}
if( $order == $this->mOrderType ) {
'last' => wfMsgHtml( 'histfirst' )
);
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
$pagingLinks = $this->getPagingLinks( $linkTexts );
$limitLinks = $this->getLimitLinks();
- $limits = implode( $separator, $limitLinks );
+ $limits = implode( ' | ', $limitLinks );
- $this->mNavigationBar = "({$pagingLinks['first']}" . $separator . "{$pagingLinks['last']}) " .
+ $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " .
wfMsgHtml("viewprevnext", $pagingLinks['prev'], $pagingLinks['next'], $limits);
return $this->mNavigationBar;
}
$diff = $wgRequest->getVal( 'diff' );
$action = $wgRequest->getText( 'action' );
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
$s = $this->printableLink();
$disclaimer = $this->disclaimerLink(); # may be empty
if( $disclaimer ) {
- $s .= $separator . $disclaimer;
+ $s .= ' | ' . $disclaimer;
}
$privacy = $this->privacyLink(); # may be empty too
if( $privacy ) {
- $s .= $separator . $privacy;
+ $s .= ' | ' . $privacy;
}
if ( $wgOut->isArticleRelated() ) {
if( $image ) {
$link = htmlspecialchars( $image->getURL() );
$style = $this->getInternalLinkAttributes( $link, $name );
- $s .= $separator . "<a href=\"{$link}\"{$style}>{$name}</a>";
+ $s .= " | <a href=\"{$link}\"{$style}>{$name}</a>";
}
}
}
if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
- $s .= $separator . $this->makeKnownLinkObj( $wgTitle,
+ $s .= ' | ' . $this->makeKnownLinkObj( $wgTitle,
wfMsg( 'currentrev' ) );
}
if( !$wgTitle->equals( $wgUser->getTalkPage() ) ) {
$tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), wfMsgHtml( 'newmessageslink' ), 'redirect=no' );
$dl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), wfMsgHtml( 'newmessagesdifflink' ), 'diff=cur' );
- $s.= $separator . '<strong>'. wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
+ $s.= ' | <strong>'. wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
# disable caching
$wgOut->setSquidMaxage(0);
$wgOut->enableClientCache(false);
$undelete = $this->getUndeleteLink();
if( !empty( $undelete ) ) {
- $s .= $separator . $undelete;
+ $s .= ' | '.$undelete;
}
return $s;
}
if( $wgOut->isSyndicated() ) {
foreach( $wgFeedClasses as $format => $class ) {
$feedurl = $wgRequest->escapeAppendQuery( "feed=$format" );
- $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . "<a href=\"$feedurl\">{$format}</a>";
+ $s .= " | <a href=\"$feedurl\">{$format}</a>";
}
}
return $s;
$getlink = $this->makeKnownLinkObj( $linkObj, htmlspecialchars( $display ) );
$c++;
if ($c>1) {
- $subpages .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
+ $subpages .= ' | ';
} else {
$subpages .= '< ';
}
SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
array(), array( 'returnto' => $returnTo )
);
- $ret .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . $this->specialLink( 'preferences' );
+ $ret .= ' | ' . $this->specialLink( 'preferences' );
}
- $ret .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . $this->link(
+ $ret .= ' | ' . $this->link(
Title::newFromText( wfMsgForContent( 'helppage' ) ),
wfMsg( 'help' )
);
$s = '';
wfRunHooks( 'SkinTemplateTabs', array( $this, &$tabs ) );
foreach( $tabs as $tab ) {
- $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . Xml::element( 'a',
+ $s .= ' | ' . Xml::element( 'a',
array( 'href' => $tab['href'] ),
$tab['text'] );
}
$varname = $wgContLang->getVariantname( $code );
if( $varname == 'disable' )
continue;
- $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . '<a href="' . $wgTitle->escapeLocalUrl( 'variant=' . $code ) . '">' . htmlspecialchars( $varname ) . '</a>';
+ $s .= ' | <a href="' . $wgTitle->escapeLocalUrl( 'variant=' . $code ) . '">' . htmlspecialchars( $varname ) . '</a>';
}
}
return $s;
$first = true;
if($wgContLang->isRTL()) $s .= '<span dir="LTR">';
foreach( $a as $l ) {
- if ( ! $first ) { $s .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ); }
+ if ( ! $first ) { $s .= ' | '; }
$first = false;
$nt = Title::newFromText( $l );
}
return '<li>'
. Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
- . $link . ' (' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools ) . ')' . '</li>';
+ . $link . ' (' . implode( ' | ', $tools ) . ')' . '</li>';
}
/**
foreach( $modes as $mode => $subpage ) {
$tools[] = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Watchlist', $subpage ), wfMsgHtml( "watchlisttools-{$mode}" ) );
}
- return implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools );
+ return implode( ' | ', $tools );
}
}
$wgOut->addScriptFile( 'allmessages.js' );
if ( $ot == 'php' ) {
$navText .= wfAllMessagesMakePhp( $messages );
- $wgOut->addHTML( 'PHP | <a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a>' .
- wfMsgExt( 'pipe-separator' , 'escapenoentities' ) .
+ $wgOut->addHTML( 'PHP | <a href="' . $wgTitle->escapeLocalUrl( 'ot=html' ) . '">HTML</a> | ' .
'<a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' .
'<pre>' . htmlspecialchars( $navText ) . '</pre>' );
} else if ( $ot == 'xml' ) {
header( 'Content-type: text/xml' );
echo wfAllMessagesMakeXml( $messages );
} else {
- $wgOut->addHTML( '<a href="' . $wgTitle->escapeLocalUrl( 'ot=php' ) . '">PHP</a>' .
- wfMsgExt( 'pipe-separator' , 'escapenoentities' ) .
- 'HTML' . wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . '<a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' );
+ $wgOut->addHTML( '<a href="' . $wgTitle->escapeLocalUrl( 'ot=php' ) . '">PHP</a> | ' .
+ 'HTML | <a href="' . $wgTitle->escapeLocalUrl( 'ot=xml' ) . '">XML</a>' );
$wgOut->addWikiText( $navText );
$wgOut->addHTML( wfAllMessagesMakeHTMLText( $messages ) );
}
}
}
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
-
if ( $this->including() ) {
$out2 = '';
} else {
. ( $namespace ? '&namespace=' . $namespace : '' );
$prevLink = $sk->makeKnownLinkObj( $self,
wfMsgHTML( 'prevpage', htmlspecialchars( $pt ) ), $q );
- $out2 .= $separator . $prevLink;
+ $out2 .= ' | ' . $prevLink;
}
if( $n == $this->maxPerPage && $s = $res->fetchObject() ) {
. ( $namespace ? '&namespace=' . $namespace : '' );
$nextLink = $sk->makeKnownLinkObj( $self,
wfMsgHtml( 'nextpage', htmlspecialchars( $t->getText() ) ), $q );
- $out2 .= $separator . $nextLink;
+ $out2 .= ' | ' . $nextLink;
}
$out2 .= "</td></tr></table><hr />";
}
$wgOut->addHTML( $prevLink );
}
if( isset( $prevLink ) && isset( $nextLink ) ) {
- $wgOut->addHTML( $separator );
+ $wgOut->addHTML( ' | ' );
}
if( isset( $nextLink ) ) {
$wgOut->addHTML( $nextLink );
$links[] = $skin->makeLink ( 'MediaWiki:Ipbreason-dropdown', wfMsgHtml( 'ipb-edit-dropdown' ) );
$links[] = $this->getUnblockLink( $skin );
$links[] = $this->getBlockListLink( $skin );
- return '<p class="mw-ipb-conveniencelinks">' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links ) . '</p>';
+ return '<p class="mw-ipb-conveniencelinks">' . implode( ' | ', $links ) . '</p>';
}
/**
wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
- $links = implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $tools );
+ $links = implode( ' | ', $tools );
}
// Old message 'contribsub' had one parameter, but that doesn't work for
$links[$key] = wfMsgHtml( $msg, $link );
}
- return implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links );
+ return implode( ' | ', $links );
}
protected function form() {
$this->tableRow(
wfMsgExt( 'prefs-memberingroups', array( 'parseinline' ), count( $userEffectiveGroupsArray ) ),
implode( wfMsg( 'comma-separator' ), $userEffectiveGroupsArray ) .
- '<br />(' . implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $toolLinks ) . ')'
+ '<br />(' . implode( ' | ', $toolLinks ) . ')'
) .
$this->tableRow(
wfMsg ( 'allpages' ) );
if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$namespaceparam = $namespace ? "&namespace=$namespace" : "";
- $out2 .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . $sk->makeKnownLinkObj(
+ $out2 .= " | " . $sk->makeKnownLinkObj(
$self,
wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ),
"from=" . wfUrlEncode( $s->page_title ) .
$cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ;
}
-
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
- $cl = implode( $separator, $cl );
+ $cl = implode( ' | ', $cl );
// day links, reset 'from' to none
foreach( $wgRCLinkDays as $value ) {
$dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ;
}
- $dl = implode( $separator, $dl );
+ $dl = implode( ' | ', $dl );
// show/hide links
if( $wgUser->useRCPatrol() )
$links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink );
$links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink );
- $hl = implode( $separator, $links );
+ $hl = implode( ' | ', $links );
// show from this onward link
$now = $wgLang->timeanddate( wfTimestampNow(), true );
$links[] = $this->makeLanguageSelectorLink( $parts[0], $parts[1] );
}
}
- return count( $links ) > 0 ? wfMsgHtml( 'loginlanguagelabel', implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links ) ) : '';
+ return count( $links ) > 0 ? wfMsgHtml( 'loginlanguagelabel', implode( ' | ', $links ) ) : '';
} else {
return '';
}
# Namespace filter and put the whole form together.
$form .= $wlInfo;
$form .= $cutofflinks;
- $form .= implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links );
+ $form .= implode( ' | ', $links );
$form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
$form .= '<p>';
$form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ';
foreach( $days as $d ) {
$days[$i++] = wlDaysLink( $d, $page, $options );
}
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
return wfMsgExt('wlshowlast',
array('parseinline', 'replaceafter'),
- implode( $separator, $hours ),
- implode( $separator, $days ),
+ implode(' | ', $hours),
+ implode(' | ', $days),
wlDaysLink( 0, $page, $options ) );
}
$limitLinks[] = $this->makeSelfLink( $prettyLimit, wfArrayToCGI( $overrides, $changed ) );
}
- $nums = implode ( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $limitLinks );
+ $nums = implode ( ' | ', $limitLinks );
return wfMsgHtml( 'viewprevnext', $prev, $next, $nums );
}
$overrides = array( $type => !$chosen );
$links[] = $this->makeSelfLink( $msg, wfArrayToCGI( $overrides, $changed ) );
}
- return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), implode( wfMsgExt( 'pipe-separator' , 'escapenoentities' ), $links ) );
+ return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), implode( ' | ', $links ) );
}
}
'comma-separator' => ', ', # only translate this message to other languages if you have to change it
'colon-separator' => ': ', # only translate this message to other languages if you have to change it
'autocomment-prefix' => '- ', # only translate this message to other languages if you have to change it
-'pipe-separator' => ' | ', # only translate this message to other languages if you have to change it
# Multipage image navigation
'imgmultipageprev' => '← previous page',
'comma-separator',
'colon-separator',
'autocomment-prefix',
- 'pipe-separator',
'listgrouprights-right-display',
'timezone-utc',
'whatlinkshere-backlink',
'comma-separator',
'colon-separator',
'autocomment-prefix',
- 'pipe-separator',
),
'imgmulti' => array(
'imgmultipageprev',
}
$s .= "<td class='bottom' align='center' valign='top'>";
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
$s .= $this->bottomLinks();
- $s .= "\n<br />" . $this->makeKnownLinkObj( Title::newMainPage() ) . $separator
- . $this->aboutLink() . $separator
+ $s .= "\n<br />" . $this->makeKnownLinkObj( Title::newMainPage() ) . " | "
+ . $this->aboutLink() . " | "
. $this->searchForm( wfMsg( "qbfind" ) );
$s .= "\n<br />" . $this->pageStats();
$q = "returnto={$rt}";
}
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
$s = "" .
- $this->mainPageLink(). $separator .
- $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) ) . $separator .
- $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) ) . $separator .
- $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") ) . $separator .
+ $this->mainPageLink()
+ . " | " .
+ $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) )
+ . " | " .
+ $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) )
+ . " | " .
+ $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") )
+ . " | " .
$this->specialLink( "specialpages" );
/* show links to different language variants */
$s .= $this->variantLinks();
$s .= $this->extensionTabLinks();
- $s .= $separator;
+ $s .= " | ";
if ( $wgUser->isLoggedIn() ) {
$s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
} else {
$l = $wgContLang->isRTL() ? 'right' : 'left';
$s .= "<td class='bottom' align='$l' valign='top'>";
- $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
-
$s .= $this->bottomLinks();
$s .= "\n<br />" . $this->mainPageLink()
- . $separator . $this->aboutLink()
- . $separator . $this->specialLink( 'recentchanges' )
- . $separator . $this->searchForm()
+ . ' | ' . $this->aboutLink()
+ . ' | ' . $this->specialLink( 'recentchanges' )
+ . ' | ' . $this->searchForm()
. '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
$s .= "</td>";