https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112433
Revision: 112433 Author: siebrand Date: 2012-02-26 13:08:41 +0000 (Sun, 26 Feb 2012) Log Message: ----------- (bug 34702) Localised parentheses are now used in more special pages. Modified Paths: -------------- trunk/phase3/RELEASE-NOTES-1.20 trunk/phase3/includes/Pager.php trunk/phase3/includes/specials/SpecialProtectedpages.php trunk/phase3/includes/specials/SpecialShortpages.php trunk/phase3/includes/specials/SpecialWhatlinkshere.php Modified: trunk/phase3/RELEASE-NOTES-1.20 =================================================================== --- trunk/phase3/RELEASE-NOTES-1.20 2012-02-26 13:07:56 UTC (rev 112432) +++ trunk/phase3/RELEASE-NOTES-1.20 2012-02-26 13:08:41 UTC (rev 112433) @@ -34,7 +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. +* (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 === Modified: trunk/phase3/includes/Pager.php =================================================================== --- trunk/phase3/includes/Pager.php 2012-02-26 13:07:56 UTC (rev 112432) +++ trunk/phase3/includes/Pager.php 2012-02-26 13:08:41 UTC (rev 112433) @@ -679,11 +679,11 @@ $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 @@ } if( $extra !== '' ) { - $this->mNavigationBar .= " ($extra)"; + $extra = ' ' . wfMessage( 'parentheses' )->rawParams( $extra )->escaped(); + $this->mNavigationBar .= $extra; } return $this->mNavigationBar; Modified: trunk/phase3/includes/specials/SpecialProtectedpages.php =================================================================== --- trunk/phase3/includes/specials/SpecialProtectedpages.php 2012-02-26 13:07:56 UTC (rev 112432) +++ trunk/phase3/includes/specials/SpecialProtectedpages.php 2012-02-26 13:08:41 UTC (rev 112433) @@ -118,15 +118,15 @@ # 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 @@ 'type' => 'protect', 'page' => $title->getPrefixedText() ) - ) . ')'; + ); } + $changeProtection = ' ' . wfMessage( 'parentheses' )->rawParams( $changeProtection )->escaped(); + wfProfileOut( __METHOD__ ); return Html::rawElement( Modified: trunk/phase3/includes/specials/SpecialShortpages.php =================================================================== --- trunk/phase3/includes/specials/SpecialShortpages.php 2012-02-26 13:07:56 UTC (rev 112432) +++ trunk/phase3/includes/specials/SpecialShortpages.php 2012-02-26 13:08:41 UTC (rev 112433) @@ -95,8 +95,10 @@ : 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>"; } } Modified: trunk/phase3/includes/specials/SpecialWhatlinkshere.php =================================================================== --- trunk/phase3/includes/specials/SpecialWhatlinkshere.php 2012-02-26 13:07:56 UTC (rev 112432) +++ trunk/phase3/includes/specials/SpecialWhatlinkshere.php 2012-02-26 13:08:41 UTC (rev 112433) @@ -316,12 +316,12 @@ $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" : _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs