r112433 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112432‎ | r112433 | r112434 >
Date:13:08, 26 February 2012
Author:siebrand
Status:ok
Tags:i18nreview 
Comment:
(bug 34702) Localised parentheses are now used in more special pages.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.20 (modified) (history)
  • /trunk/phase3/includes/Pager.php (modified) (history)
  • /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 = '(' . implode( $msgcache['semicolon-separator'], $props ) . ')';
 320+ $propsText = wfMessage( '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( "($wlhLink)", 'mw-whatlinkshere-tools' );
 325+ $wlh = Xml::wrapClass( wfMessage( '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,8 +95,10 @@
9696 : Linker::linkKnown( $title );
9797 $size = $this->msg( 'nbytes' )->numParams( $result->value )->escaped();
9898
 99+ $hlinkInParentheses = wfMessage( 'parentheses' )->rawParams( $hlink )->escaped();
 100+
99101 return $title->exists()
100 - ? "({$hlink}) {$dm}{$plink} {$dm}[{$size}]"
101 - : "<del>({$hlink}) {$dm}{$plink} {$dm}[{$size}]</del>";
 102+ ? "${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]"
 103+ : "<del>${hlinkInParentheses} {$dm}{$plink} {$dm}[{$size}]</del>";
102104 }
103105 }
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php
@@ -118,15 +118,15 @@
119119
120120 # Show a link to the change protection form for allowed users otherwise a link to the protection log
121121 if( $this->getUser()->isAllowed( 'protect' ) ) {
122 - $changeProtection = ' (' . Linker::linkKnown(
 122+ $changeProtection = Linker::linkKnown(
123123 $title,
124124 wfMsgHtml( 'protect_change' ),
125125 array(),
126126 array( 'action' => 'unprotect' )
127 - ) . ')';
 127+ );
128128 } else {
129129 $ltitle = SpecialPage::getTitleFor( 'Log' );
130 - $changeProtection = ' (' . Linker::linkKnown(
 130+ $changeProtection = Linker::linkKnown(
131131 $ltitle,
132132 wfMsgHtml( 'protectlogpage' ),
133133 array(),
@@ -134,9 +134,11 @@
135135 'type' => 'protect',
136136 'page' => $title->getPrefixedText()
137137 )
138 - ) . ')';
 138+ );
139139 }
140140
 141+ $changeProtection = ' ' . wfMessage( 'parentheses' )->rawParams( $changeProtection )->escaped();
 142+
141143 wfProfileOut( __METHOD__ );
142144
143145 return Html::rawElement(
Index: trunk/phase3/includes/Pager.php
@@ -679,11 +679,11 @@
680680 $limitLinks = $this->getLimitLinks();
681681 $limits = $lang->pipeList( $limitLinks );
682682
683 - $this->mNavigationBar =
684 - "(" . $lang->pipeList(
 683+ $this->mNavigationBar = wfMessage( 'parentheses' )->rawParams(
 684+ $lang->pipeList(
685685 array( $pagingLinks['first'],
686686 $pagingLinks['last'] )
687 - ) . ") " .
 687+ ) )->escaped() . " " .
688688 wfMsgHtml( 'viewprevnext', $pagingLinks['prev'],
689689 $pagingLinks['next'], $limits );
690690
@@ -713,7 +713,8 @@
714714 }
715715
716716 if( $extra !== '' ) {
717 - $this->mNavigationBar .= " ($extra)";
 717+ $extra = ' ' . wfMessage( 'parentheses' )->rawParams( $extra )->escaped();
 718+ $this->mNavigationBar .= $extra;
718719 }
719720
720721 return $this->mNavigationBar;
Index: trunk/phase3/RELEASE-NOTES-1.20
@@ -34,7 +34,7 @@
3535 copy/paste on supporting browsers
3636 * (bug 34428) Fixed incorrect hash mismatch errors in the DiffHistoryBlob
3737 history compression method.
38 -* (bug 34702) Special:Contributions now uses localised parentheses.
 38+* (bug 34702) Localised parentheses are now used in more special pages.
3939 * (bug 34723) When editing a script page on a RTL wiki the textbox should be LTR.
4040
4141 === API changes in 1.20 ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r112436Use local context ( $this->msg() ) instead of global method wfMessage() per I...siebrand14:02, 26 February 2012
r112589(bug 34702) More localised parentheses. Patch contributed by Yusuke Matsubara.siebrand11:56, 28 February 2012
r112591(bug 34702) More localised parentheses.siebrand12:41, 28 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112410(bug 34702) Use localised parentheses in Special:Contributions.siebrand20:42, 25 February 2012
r112412Follow-up r112410: (bug 34702) Use localised parentheses for comment, too.siebrand20:53, 25 February 2012

Status & tagging log