https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112410
Revision: 112410 Author: siebrand Date: 2012-02-25 20:42:08 +0000 (Sat, 25 Feb 2012) Log Message: ----------- (bug 34702) Use localised parentheses in Special:Contributions. Modified Paths: -------------- trunk/phase3/RELEASE-NOTES-1.20 trunk/phase3/includes/Linker.php trunk/phase3/includes/Pager.php trunk/phase3/includes/specials/SpecialContributions.php Modified: trunk/phase3/RELEASE-NOTES-1.20 =================================================================== --- trunk/phase3/RELEASE-NOTES-1.20 2012-02-25 20:36:21 UTC (rev 112409) +++ trunk/phase3/RELEASE-NOTES-1.20 2012-02-25 20:42:08 UTC (rev 112410) @@ -34,6 +34,7 @@ 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. Modified: trunk/phase3/includes/Linker.php =================================================================== --- trunk/phase3/includes/Linker.php 2012-02-25 20:36:21 UTC (rev 112409) +++ trunk/phase3/includes/Linker.php 2012-02-25 20:42:08 UTC (rev 112410) @@ -1440,7 +1440,7 @@ } 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 @@ $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 @@ */ 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 */ Modified: trunk/phase3/includes/Pager.php =================================================================== --- trunk/phase3/includes/Pager.php 2012-02-25 20:36:21 UTC (rev 112409) +++ trunk/phase3/includes/Pager.php 2012-02-25 20:42:08 UTC (rev 112410) @@ -769,15 +769,17 @@ $pagingLinks = $this->getPagingLinks( $linkTexts ); $limitLinks = $this->getLimitLinks(); $limits = $this->getLanguage()->pipeList( $limitLinks ); + $firstLastLinks = wfMessage( 'parentheses' )->rawParams( "{$pagingLinks['first']}" . + wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . + "{$pagingLinks['last']}" ); - $this->mNavigationBar = "({$pagingLinks['first']}" . - wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . - "{$pagingLinks['last']}) " . + $this->mNavigationBar = $firstLastLinks . ' ' . wfMsgHTML( 'viewprevnext', $pagingLinks['prev'], $pagingLinks['next'], $limits ); + return $this->mNavigationBar; } Modified: trunk/phase3/includes/specials/SpecialContributions.php =================================================================== --- trunk/phase3/includes/specials/SpecialContributions.php 2012-02-25 20:36:21 UTC (rev 112409) +++ trunk/phase3/includes/specials/SpecialContributions.php 2012-02-25 20:42:08 UTC (rev 112410) @@ -251,9 +251,11 @@ // 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 @@ $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 _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs