r97728 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97727‎ | r97728 | r97729 >
Date:13:07, 21 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r97726, this brings Babel to trunk state
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/Babel/Babel.class.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/Babel/Babel.i18n.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/Babel/Babel.class.php
@@ -199,8 +199,13 @@
200200 */
201201 protected static function mGenerateBox( $code, $level ) {
202202 $lang = wfBCP47( $code );
203 - $portal = wfMsgForContent( 'babel-portal', $code );
204 - $header = "[[$portal|" . $lang . "]]<span class=\"mw-babel-box-level-$level\">-$level</span>";
 203+ $portal = wfMessage( 'babel-portal', $code )->plain();
 204+ if ( $portal !== '' ) {
 205+ $portal = "[[$portal|$lang]]";
 206+ } else {
 207+ $portal = $lang;
 208+ }
 209+ $header = "$portal<span class=\"mw-babel-box-level-$level\">-$level</span>";
205210
206211 $code = strtolower( $code );
207212 $name = BabelLanguageCodes::getName( $code );
Index: branches/wmf/1.17wmf1/extensions/Babel/Babel.i18n.php
@@ -48,7 +48,7 @@
4949 'babel-cellspacing' => '0', # Do not translate or duplicate this message to other languages.
5050 'babel-cellpadding' => '0', # Do not translate or duplicate this message to other languages.
5151
52 - 'babel-portal' => '$1', # Do not translate or duplicate this message to other languages.
 52+ 'babel-portal' => '', # Do not translate or duplicate this message to other languages.
5353 'babel-template' => 'Template:$1', # Do not translate or duplicate this message to other languages.
5454
5555 'babel-footer' => 'Users by language',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97726If babel-portal is empty, don't make a link. Made it empty by default.nikerabbit13:03, 21 September 2011

Status & tagging log