r47053 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47052‎ | r47053 | r47054 >
Date:21:47, 9 February 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Replace hard coded pipe separators with locale based
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1271,6 +1271,7 @@
12721272
12731273 $cancel = $sk->makeKnownLink( $wgTitle->getPrefixedText(),
12741274 wfMsgExt('cancel', array('parseinline')) );
 1275+ $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
12751276 $edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ));
12761277 $edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
12771278 htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
@@ -1445,7 +1446,7 @@
14461447 $wgOut->addHTML(
14471448 "<div class='editButtons'>
14481449 {$buttonshtml}
1449 - <span class='editHelp'>{$cancel} | {$edithelp}</span>
 1450+ <span class='editHelp'>{$cancel}{$separator}{$edithelp}</span>
14501451 </div><!-- editButtons -->
14511452 </div><!-- editOptions -->");
14521453
Index: trunk/phase3/includes/LogEventsList.php
@@ -93,7 +93,7 @@
9494 }
9595
9696 private function getFilterLinks( $logType, $filter ) {
97 - global $wgTitle;
 97+ global $wgTitle, $wgLang;
9898 // show/hide links
9999 $messages = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) );
100100 // Option value -> message mapping
@@ -106,7 +106,7 @@
107107 $links[$type] = wfMsgHtml( "log-show-hide-{$type}", $link );
108108 }
109109 // Build links
110 - return implode( ' | ', $links );
 110+ return $wgLang->pipeList( $links );
111111 }
112112
113113 private function getDefaultQuery() {
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -62,6 +62,8 @@
6363 }
6464
6565 function getNavigationBar() {
 66+ global $wgLang;
 67+
6668 if ( isset( $this->mNavigationBar ) ) {
6769 return $this->mNavigationBar;
6870 }
@@ -74,9 +76,9 @@
7577
7678 $pagingLinks = $this->getPagingLinks( $linkTexts );
7779 $limitLinks = $this->getLimitLinks();
78 - $limits = implode( ' | ', $limitLinks );
 80+ $limits = $wgLang->pipeList( $limitLinks );
7981
80 - $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " .
 82+ $this->mNavigationBar = "(" . $wgLang->pipeList( array( $pagingLinks['first'], $pagingLinks['last'] ) ) . ") " .
8183 wfMsgExt( 'viewprevnext', array( 'parsemag' ), $pagingLinks['prev'], $pagingLinks['next'], $limits );
8284 return $this->mNavigationBar;
8385 }
@@ -308,7 +310,7 @@
309311
310312 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
311313
312 - $links = implode( ' | ', $tools );
 314+ $links = $wgLang->pipeList( $tools );
313315 }
314316
315317 // Old message 'contribsub' had one parameter, but that doesn't work for

Follow-up revisions

RevisionCommit summaryAuthorDate
r47084Oops, accidentally reverted r47053 in m last commitialex13:10, 10 February 2009

Status & tagging log