r112429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112428‎ | r112429 | r112430 >
Date:12:51, 26 February 2012
Author:siebrand
Status:resolved
Tags:
Comment:
Remove hard coded parentheses.
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialTranslations.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialTranslations.php
@@ -193,6 +193,8 @@
194194
195195 $ajaxPageList = array();
196196 $historyText = "&#160;<sup>" . wfMsgHtml( 'translate-translations-history-short' ) . "</sup>&#160;";
 197+ $separator = wfMessage( 'word-separator' )->plain();
 198+ $parentheses = wfMessage( 'parentheses' )->escaped();
197199
198200 foreach ( $res as $s ) {
199201 $key = $s->page_title;
@@ -201,7 +203,9 @@
202204
203205 $code = $this->getCode( $s->page_title );
204206
205 - $text = TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() ) . " ($code)";
 207+ $text = TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() );
 208+ $text .= $separator;
 209+ $text .= $paretheses->params( $code );
206210 $text = htmlspecialchars( $text );
207211
208212 if ( $canTranslate ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r112430Follow-up r112429: Fix typo in variable name.siebrand12:52, 26 February 2012
r112431Follow-up r112429: Didn't work as I thought it would. Thanks Niklas.siebrand12:58, 26 February 2012

Status & tagging log