(bug 34702) Localised parentheses are now used in more special pages.
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sun, 26 Feb 2012 13:08:41 +0000 (13:08 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sun, 26 Feb 2012 13:08:41 +0000 (13:08 +0000)
RELEASE-NOTES-1.20
includes/Pager.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialShortpages.php
includes/specials/SpecialWhatlinkshere.php

index cbe436f..62461ed 100644 (file)
@@ -34,7 +34,7 @@ production.
   copy/paste on supporting browsers
 * (bug 34428) Fixed incorrect hash mismatch errors in the DiffHistoryBlob 
   history compression method.
-* (bug 34702) Special:Contributions now uses localised parentheses.
+* (bug 34702) Localised parentheses are now used in more special pages.
 * (bug 34723) When editing a script page on a RTL wiki the textbox should be LTR.
 
 === API changes in 1.20 ===
index 86b7729..cd0d9eb 100644 (file)
@@ -679,11 +679,11 @@ abstract class AlphabeticPager extends IndexPager {
                $limitLinks = $this->getLimitLinks();
                $limits = $lang->pipeList( $limitLinks );
 
-               $this->mNavigationBar =
-                       "(" . $lang->pipeList(
+               $this->mNavigationBar = wfMessage( 'parentheses' )->rawParams(
+                       $lang->pipeList(
                                array( $pagingLinks['first'],
                                $pagingLinks['last'] )
-                       ) . ") " .
+                       ) )->escaped() . " " .
                        wfMsgHtml( 'viewprevnext', $pagingLinks['prev'],
                        $pagingLinks['next'], $limits );
 
@@ -713,7 +713,8 @@ abstract class AlphabeticPager extends IndexPager {
                }
 
                if( $extra !== '' ) {
-                       $this->mNavigationBar .= " ($extra)";
+                       $extra = ' ' . wfMessage( 'parentheses' )->rawParams( $extra )->escaped();
+                       $this->mNavigationBar .= $extra;
                }
 
                return $this->mNavigationBar;
index eec974f..fa45255 100644 (file)
@@ -118,15 +118,15 @@ class SpecialProtectedpages extends SpecialPage {
 
                # Show a link to the change protection form for allowed users otherwise a link to the protection log
                if( $this->getUser()->isAllowed( 'protect' ) ) {
-                       $changeProtection = ' (' . Linker::linkKnown(
+                       $changeProtection = Linker::linkKnown(
                                $title,
                                wfMsgHtml( 'protect_change' ),
                                array(),
                                array( 'action' => 'unprotect' )
-                       ) . ')';
+                       );
                } else {
                        $ltitle = SpecialPage::getTitleFor( 'Log' );
-                       $changeProtection = ' (' . Linker::linkKnown(
+                       $changeProtection = Linker::linkKnown(
                                $ltitle,
                                wfMsgHtml( 'protectlogpage' ),
                                array(),
@@ -134,9 +134,11 @@ class SpecialProtectedpages extends SpecialPage {
                                        'type' => 'protect',
                                        'page' => $title->getPrefixedText()
                                )
-                       ) . ')';
+                       );
                }
 
+               $changeProtection = ' ' . wfMessage( 'parentheses' )->rawParams( $changeProtection )->escaped();
+
                wfProfileOut( __METHOD__ );
 
                return Html::rawElement(
index c176f91..5657b68 100644 (file)
@@ -95,8 +95,10 @@ class ShortPagesPage extends QueryPage {
                                        : Linker::linkKnown( $title );
                $size = $this->msg( 'nbytes' )->numParams( $result->value )->escaped();
 
+               $hlinkInParentheses = wfMessage( 'parentheses' )->rawParams( $hlink )->escaped();
+
                return $title->exists()
-                               ? "({$hlink}) {$dm}{$plink} {$dm}[{$size}]"
-                               : "<del>({$hlink}) {$dm}{$plink} {$dm}[{$size}]</del>";
+                               ? "${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]"
+                               : "<del>${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]</del>";
        }
 }
index 79305ad..4cff1ee 100644 (file)
@@ -316,12 +316,12 @@ class SpecialWhatLinksHere extends SpecialPage {
                        $props[] = $msgcache['isimage'];
 
                if ( count( $props ) ) {
-                       $propsText = '(' . implode( $msgcache['semicolon-separator'], $props ) . ')';
+                       $propsText = wfMessage( 'parentheses' )->rawParams( implode( $msgcache['semicolon-separator'], $props ) )->escaped();
                }
 
                # Space for utilities links, with a what-links-here link provided
                $wlhLink = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'] );
-               $wlh = Xml::wrapClass( "($wlhLink)", 'mw-whatlinkshere-tools' );
+               $wlh = Xml::wrapClass( wfMessage( 'parentheses' )->rawParams( $wlhLink )->escaped(), 'mw-whatlinkshere-tools' );
 
                return $notClose ?
                        Xml::openElement( 'li' ) . "$link $propsText $dirmark $wlh\n" :