* Update message 'pipe-separator' to have leading and trailing space for English...
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 9 Feb 2009 09:13:30 +0000 (09:13 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 9 Feb 2009 09:13:30 +0000 (09:13 +0000)
* 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
includes/Linker.php
includes/LogEventsList.php
includes/PageHistory.php
includes/Pager.php
includes/specials/SpecialIpblocklist.php
languages/messages/MessagesEn.php
languages/messages/MessagesOc.php

index ef5aac5..3efb266 100644 (file)
@@ -986,11 +986,11 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
        } else {
                $nlink = '<a href="' . $title->escapeLocalUrl( $q ) . "\" class=\"mw-nextlink\">{$next}</a>";
        }
-       $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 );
 }
index ccb34e5..9b52671 100644 (file)
@@ -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 ' <span class="mw-usertoollinks">(' . implode( ' | ', $items ) . ')</span>';
+                       return ' <span class="mw-usertoollinks">(' . $wgLang->pipeList( $items ) . ')</span>';
                } else {
                        return '';
                }
index b3f93fa..c2bad2e 100644 (file)
@@ -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(),
index 2e44c68..bd3edba 100644 (file)
@@ -358,7 +358,7 @@ class PageHistory {
                }
 
                if( $tools ) {
-                       $s .= ' (' . implode( ' | ', $tools ) . ')';
+                       $s .= ' (' . $wgLang->pipeList( $tools ) . ')';
                }
 
                # Tags
index 653b881..3aa05c9 100644 (file)
@@ -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;
        }
index 8d57354..ac71439 100644 (file)
@@ -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' );
index 8b3dff9..c10be7b 100644 (file)
@@ -3579,7 +3579,7 @@ Please confirm that you really want to recreate this page.",
 'comma-separator'     => ',&#32;', # only translate this message to other languages if you have to change it
 'colon-separator'     => ':&#32;', # only translate this message to other languages if you have to change it
 'autocomment-prefix'  => '-&#32;', # 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'      => '&#32;|&#32;', # only translate this message to other languages if you have to change it
 'word-separator'      => '&#32;', # 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
 
index 793ade0..65d6577 100644 (file)
@@ -2912,7 +2912,7 @@ Confirmatz que desiratz tornar crear aqueste article.",
 # Separators for various lists, etc.
 'colon-separator'    => '&nbsp;:&#32;',
 'autocomment-prefix' => '-',
-'pipe-separator'     => '',
+'pipe-separator'     => '&#32;•&#32;',
 
 # Multipage image navigation
 'imgmultipageprev' => '← pagina precedenta',