Replace hard coded pipe separators with locale based
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 9 Feb 2009 21:47:00 +0000 (21:47 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 9 Feb 2009 21:47:00 +0000 (21:47 +0000)
includes/EditPage.php
includes/LogEventsList.php
includes/specials/SpecialDeletedContributions.php

index b5aca92..80bc5e4 100644 (file)
@@ -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 = '<a target="helpwindow" href="'.$edithelpurl.'">'.
                        htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
@@ -1445,7 +1446,7 @@ END
                $wgOut->addHTML(
 "<div class='editButtons'>
 {$buttonshtml}
-       <span class='editHelp'>{$cancel} | {$edithelp}</span>
+       <span class='editHelp'>{$cancel}{$separator}{$edithelp}</span>
 </div><!-- editButtons -->
 </div><!-- editOptions -->");
 
index c2bad2e..b326829 100644 (file)
@@ -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() {
index 3ab90c6..a4e5fb2 100644 (file)
@@ -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