r112436 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112435‎ | r112436 | r112437 >
Date:14:02, 26 February 2012
Author:siebrand
Status:ok
Tags:i18nreview 
Comment:
Use local context ( $this->msg() ) instead of global method wfMessage() per IAlex. Follows-up r112433.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialProtectedpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialShortpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -316,12 +316,12 @@
317317 $props[] = $msgcache['isimage'];
318318
319319 if ( count( $props ) ) {
320 - $propsText = wfMessage( 'parentheses' )->rawParams( implode( $msgcache['semicolon-separator'], $props ) )->escaped();
 320+ $propsText = $this->msg( 'parentheses' )->rawParams( implode( $msgcache['semicolon-separator'], $props ) )->escaped();
321321 }
322322
323323 # Space for utilities links, with a what-links-here link provided
324324 $wlhLink = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'] );
325 - $wlh = Xml::wrapClass( wfMessage( 'parentheses' )->rawParams( $wlhLink )->escaped(), 'mw-whatlinkshere-tools' );
 325+ $wlh = Xml::wrapClass( $this->msg( 'parentheses' )->rawParams( $wlhLink )->escaped(), 'mw-whatlinkshere-tools' );
326326
327327 return $notClose ?
328328 Xml::openElement( 'li' ) . "$link $propsText $dirmark $wlh\n" :
Index: trunk/phase3/includes/specials/SpecialShortpages.php
@@ -95,7 +95,7 @@
9696 : Linker::linkKnown( $title );
9797 $size = $this->msg( 'nbytes' )->numParams( $result->value )->escaped();
9898
99 - $hlinkInParentheses = wfMessage( 'parentheses' )->rawParams( $hlink )->escaped();
 99+ $hlinkInParentheses = $this->msg( 'parentheses' )->rawParams( $hlink )->escaped();
100100
101101 return $title->exists()
102102 ? "${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]"
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php
@@ -137,7 +137,7 @@
138138 );
139139 }
140140
141 - $changeProtection = ' ' . wfMessage( 'parentheses' )->rawParams( $changeProtection )->escaped();
 141+ $changeProtection = ' ' . $this->msg( 'parentheses' )->rawParams( $changeProtection )->escaped();
142142
143143 wfProfileOut( __METHOD__ );
144144

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112433(bug 34702) Localised parentheses are now used in more special pages.siebrand13:08, 26 February 2012

Status & tagging log