(bug 34702) Use localised parentheses in Special:Contributions.
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 25 Feb 2012 20:42:08 +0000 (20:42 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 25 Feb 2012 20:42:08 +0000 (20:42 +0000)
RELEASE-NOTES-1.20
includes/Linker.php
includes/Pager.php
includes/specials/SpecialContributions.php

index 65317f3..1647aa5 100644 (file)
@@ -34,6 +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.
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index ef1f043..52e00ba 100644 (file)
@@ -1440,7 +1440,7 @@ class Linker {
                } else {
                        global $wgLang;
                        $stxt = wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $size ) );
-                       $stxt = "($stxt)";
+                       $stxt = wfMessage( 'parentheses' )->rawParams( $stxt );
                }
                $stxt = htmlspecialchars( $stxt );
                return "<span class=\"history-size\">$stxt</span>";
@@ -1869,7 +1869,7 @@ class Linker {
                $html = $delete ? wfMsgHtml( 'rev-delundel' ) : wfMsgHtml( 'rev-showdeleted' );
                $tag = $restricted ? 'strong' : 'span';
                $link = self::link( $sp, $html, array(), $query, array( 'known', 'noclasses' ) );
-               return Xml::tags( $tag, array( 'class' => 'mw-revdelundel-link' ), "($link)" );
+               return Xml::tags( $tag, array( 'class' => 'mw-revdelundel-link' ), wfMessage( 'parentheses' )->rawParams( $link ) );
        }
 
        /**
@@ -1882,7 +1882,7 @@ class Linker {
         */
        public static function revDeleteLinkDisabled( $delete = true ) {
                $html = $delete ? wfMsgHtml( 'rev-delundel' ) : wfMsgHtml( 'rev-showdeleted' );
-               return Xml::tags( 'span', array( 'class' => 'mw-revdelundel-link' ), "($html)" );
+               return Xml::tags( 'span', array( 'class' => 'mw-revdelundel-link' ), wfMessage( 'parentheses' )->rawParams( $html ) );
        }
 
        /* Deprecated methods */
index f9231d5..a9937e4 100644 (file)
@@ -769,15 +769,17 @@ abstract class ReverseChronologicalPager extends IndexPager {
                $pagingLinks = $this->getPagingLinks( $linkTexts );
                $limitLinks = $this->getLimitLinks();
                $limits = $this->getLanguage()->pipeList( $limitLinks );
-
-               $this->mNavigationBar = "({$pagingLinks['first']}" .
+               $firstLastLinks = wfMessage( 'parentheses' )->rawParams( "{$pagingLinks['first']}" .
                        wfMsgExt( 'pipe-separator' , 'escapenoentities' ) .
-                       "{$pagingLinks['last']}) " .
+                       "{$pagingLinks['last']}" );
+
+               $this->mNavigationBar = $firstLastLinks . ' ' .
                        wfMsgHTML(
                                'viewprevnext',
                                $pagingLinks['prev'], $pagingLinks['next'],
                                $limits
                        );
+
                return $this->mNavigationBar;
        }
 
index 03820b4..ce67a6d 100644 (file)
@@ -251,9 +251,11 @@ class SpecialContributions extends SpecialPage {
                // languages that want to put the "for" bit right after $user but before
                // $links.  If 'contribsub' is around, use it for reverse compatibility,
                // otherwise use 'contribsub2'.
+               // @todo Should this be removed at some point?
                $oldMsg = $this->msg( 'contribsub' );
                if ( $oldMsg->exists() ) {
-                       return $oldMsg->rawParams( "$user ($links)" );
+                       $linksWithParentheses = $this->msg( 'parenteses' )->rawParams( $links );
+                       return $oldMsg->rawParams( "$user $linksWithParentheses" );
                } else {
                        return $this->msg( 'contribsub2' )->rawParams( $user, $links );
                }
@@ -837,7 +839,7 @@ class ContribsPager extends ReverseChronologicalPager {
                        $del .= ' ';
                }
 
-               $diffHistLinks = '(' . $difftext . $this->messages['pipe-separator'] . $histlink . ')';
+               $diffHistLinks = $this->msg( 'parentheses' )->rawParams( $difftext . $this->messages['pipe-separator'] . $histlink );
                $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
 
                # Denote if username is redacted for this edit