From a130b5b8fa6e0aa9ea8f7cbb447792f6e8246627 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 9 Feb 2009 09:13:30 +0000 Subject: [PATCH] * Update message 'pipe-separator' to have leading and trailing space for English and Occitan, to be able to remove some hard coded spaces * Take out some hard coded pipe characters. Replace by message or Language::pipeList * Take out a hard coded comma list SpecialIpblocklist.php. Replace by Language::commaList --- includes/GlobalFunctions.php | 10 +++++----- includes/Linker.php | 4 ++-- includes/LogEventsList.php | 4 ++-- includes/PageHistory.php | 2 +- includes/Pager.php | 8 ++++---- includes/specials/SpecialIpblocklist.php | 8 ++++---- languages/messages/MessagesEn.php | 2 +- languages/messages/MessagesOc.php | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index ef5aac5577..3efb266a72 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -986,11 +986,11 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) { } else { $nlink = '{$next}"; } - $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 ); + $nums = $wgLang->pipeList( 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 ); } diff --git a/includes/Linker.php b/includes/Linker.php index ccb34e52ec..9b52671391 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1053,7 +1053,7 @@ class Linker { * @return string */ public function userToolLinks( $userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits=null ) { - global $wgUser, $wgDisableAnonTalk, $wgSysopUserBans; + global $wgUser, $wgDisableAnonTalk, $wgSysopUserBans, $wgLang; $talkable = !( $wgDisableAnonTalk && 0 == $userId ); $blockable = ( $wgSysopUserBans || 0 == $userId ) && !$flags & self::TOOL_LINKS_NOBLOCK; @@ -1079,7 +1079,7 @@ class Linker { } if( $items ) { - return ' (' . implode( ' | ', $items ) . ')'; + return ' (' . $wgLang->pipeList( $items ) . ')'; } else { return ''; } diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index b3f93fa737..c2bad2e490 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -280,7 +280,7 @@ class LogEventsList { array(), array( 'action' => 'unblock', 'ip' => $row->log_title ), 'known' ) - . ' ' . $this->message['pipe-separator'] . ' ' . + . $this->message['pipe-separator'] . $this->skin->link( SpecialPage::getTitleFor( 'Blockip', $row->log_title ), $this->message['change-blocklink'], array(), array(), 'known' ) . @@ -293,7 +293,7 @@ class LogEventsList { array(), array( 'action' => 'history', 'offset' => $row->log_timestamp ) ); if( $wgUser->isAllowed( 'protect' ) ) { - $revert .= ' ' . $this->message['pipe-separator'] . ' ' . + $revert .= $this->message['pipe-separator'] . $this->skin->link( $title, $this->message['protect_change'], array(), diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 2e44c68dab..bd3edbafd5 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -358,7 +358,7 @@ class PageHistory { } if( $tools ) { - $s .= ' (' . implode( ' | ', $tools ) . ')'; + $s .= ' (' . $wgLang->pipeList( $tools ) . ')'; } # Tags diff --git a/includes/Pager.php b/includes/Pager.php index 653b88186b..3aa05c9226 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -530,7 +530,7 @@ abstract class AlphabeticPager extends IndexPager { $pagingLinks = $this->getPagingLinks( $linkTexts ); $limitLinks = $this->getLimitLinks(); - $limits = implode( ' | ', $limitLinks ); + $limits = $wgLang->pipeList( $limitLinks ); $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " . @@ -549,7 +549,7 @@ abstract class AlphabeticPager extends IndexPager { if( $first ) { $first = false; } else { - $extra .= ' | '; + $extra .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ); } if( $order == $this->mOrderType ) { @@ -610,9 +610,9 @@ abstract class ReverseChronologicalPager extends IndexPager { $pagingLinks = $this->getPagingLinks( $linkTexts ); $limitLinks = $this->getLimitLinks(); - $limits = implode( ' | ', $limitLinks ); + $limits = $wgLang->pipeList( $limitLinks ); - $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " . + $this->mNavigationBar = "({$pagingLinks['first']}" . wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . "{$pagingLinks['last']}) " . wfMsgHtml("viewprevnext", $pagingLinks['prev'], $pagingLinks['next'], $limits); return $this->mNavigationBar; } diff --git a/includes/specials/SpecialIpblocklist.php b/includes/specials/SpecialIpblocklist.php index 8d573547ee..ac714398e8 100644 --- a/includes/specials/SpecialIpblocklist.php +++ b/includes/specials/SpecialIpblocklist.php @@ -306,7 +306,7 @@ class IPUnblockForm { } function searchForm() { - global $wgTitle, $wgScript, $wgRequest; + global $wgTitle, $wgScript, $wgRequest, $wgLang; $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) ); $nondefaults = array(); @@ -330,7 +330,7 @@ class IPUnblockForm { $links[] = wfMsgHtml( 'ipblocklist-sh-userblocks', $ubLink ); $links[] = wfMsgHtml( 'ipblocklist-sh-tempblocks', $tbLink ); $links[] = wfMsgHtml( 'ipblocklist-sh-addressblocks', $sipbLink ); - $hl = implode( ' ' . wfMsg( 'pipe-separator' ) . ' ', $links ); + $hl = $wgLang->pipeList( $links ); return Xml::tags( 'form', array( 'action' => $wgScript ), @@ -418,7 +418,7 @@ class IPUnblockForm { $properties[] = $msg['blocklist-nousertalk']; } - $properties = implode( ', ', $properties ); + $properties = $wgLang->commaList( $properties ); $line = wfMsgReplaceArgs( $msg['blocklistline'], array( $formattedTime, $blocker, $target, $properties ) ); @@ -434,7 +434,7 @@ class IPUnblockForm { # Create changeblocklink for all blocks with exception of autoblocks if( !$block->mAuto ) { - $changeblocklink = ' ' . wfMsg( 'pipe-separator' ) . ' ' . + $changeblocklink = wfMsg( 'pipe-separator' ) . $sk->link( SpecialPage::getTitleFor( 'Blockip', $block->mAddress ), $msg['change-blocklink'], array(), array(), 'known' ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 8b3dff9cc9..c10be7bc69 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3579,7 +3579,7 @@ Please confirm that you really want to recreate this page.", '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 +'pipe-separator' => ' | ', # only translate this message to other languages if you have to change it 'word-separator' => ' ', # only translate this message to other languages if you have to change it 'ellipsis' => '…', # only translate this message to other languages if you have to change it diff --git a/languages/messages/MessagesOc.php b/languages/messages/MessagesOc.php index 793ade08ae..65d6577fc5 100644 --- a/languages/messages/MessagesOc.php +++ b/languages/messages/MessagesOc.php @@ -2912,7 +2912,7 @@ Confirmatz que desiratz tornar crear aqueste article.", # Separators for various lists, etc. 'colon-separator' => ' : ', 'autocomment-prefix' => '-', -'pipe-separator' => '•', +'pipe-separator' => ' • ', # Multipage image navigation 'imgmultipageprev' => '← pagina precedenta', -- 2.20.1