From be805f47bca9b4412f2399a272d2b30500ef7c02 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 9 Feb 2009 21:47:00 +0000 Subject: [PATCH] Replace hard coded pipe separators with locale based --- includes/EditPage.php | 3 ++- includes/LogEventsList.php | 4 ++-- includes/specials/SpecialDeletedContributions.php | 8 +++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index b5aca920fc..80bc5e44ae 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1271,6 +1271,7 @@ class EditPage { $cancel = $sk->makeKnownLink( $wgTitle->getPrefixedText(), wfMsgExt('cancel', array('parseinline')) ); + $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' ); $edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' )); $edithelp = ''. htmlspecialchars( wfMsg( 'edithelp' ) ).' '. @@ -1445,7 +1446,7 @@ END $wgOut->addHTML( "
{$buttonshtml} - {$cancel} | {$edithelp} + {$cancel}{$separator}{$edithelp}
"); diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index c2bad2e490..b32682947a 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -93,7 +93,7 @@ class LogEventsList { } private function getFilterLinks( $logType, $filter ) { - global $wgTitle; + global $wgTitle, $wgLang; // show/hide links $messages = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) ); // Option value -> message mapping @@ -106,7 +106,7 @@ class LogEventsList { $links[$type] = wfMsgHtml( "log-show-hide-{$type}", $link ); } // Build links - return implode( ' | ', $links ); + return $wgLang->pipeList( $links ); } private function getDefaultQuery() { diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 3ab90c60e1..a4e5fb2262 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -62,6 +62,8 @@ class DeletedContribsPager extends IndexPager { } function getNavigationBar() { + global $wgLang; + if ( isset( $this->mNavigationBar ) ) { return $this->mNavigationBar; } @@ -74,9 +76,9 @@ class DeletedContribsPager extends IndexPager { $pagingLinks = $this->getPagingLinks( $linkTexts ); $limitLinks = $this->getLimitLinks(); - $limits = implode( ' | ', $limitLinks ); + $limits = $wgLang->pipeList( $limitLinks ); - $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " . + $this->mNavigationBar = "(" . $wgLang->pipeList( array( $pagingLinks['first'], $pagingLinks['last'] ) ) . ") " . wfMsgExt( 'viewprevnext', array( 'parsemag' ), $pagingLinks['prev'], $pagingLinks['next'], $limits ); return $this->mNavigationBar; } @@ -308,7 +310,7 @@ class DeletedContributionsPage extends SpecialPage { wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) ); - $links = implode( ' | ', $tools ); + $links = $wgLang->pipeList( $tools ); } // Old message 'contribsub' had one parameter, but that doesn't work for -- 2.20.1