r39576 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39575‎ | r39576 | r39577 >
Date:09:26, 18 August 2008
Author:daniel
Status:old
Tags:
Comment:
fixed fallback to content lang, behavior for special:allmessages is a bit odd now. needs some more thought.
Modified paths:
  • /trunk/extensions/Gadgets/Gadgets.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Gadgets/Gadgets.php
@@ -243,16 +243,21 @@
244244 if ( !$gadgets ) return true;
245245
246246 $messages = array();
 247+ $msgOpt = array( 'parseinline' );
247248
248249 foreach ( $gadgets as $section => $entries ) {
249250 if ( $section !== false && $section !== '' ) {
250251 $tname = "gadget-section-$section";
251 - $messages[$tname] = $section;
 252+ $ttext = wfMsgExt( $tname, $msgOpt );
 253+ if ( wfEmptyMsg( $tname, $ttext ) ) $ttext = $section;
 254+ $messages[$tname] = $ttext;
252255 }
253256
254257 foreach ( $entries as $gname => $code ) {
255258 $tname = "gadget-$gname";
256 - $messages[$tname] = $gname;
 259+ $ttext = wfMsgExt( $tname, $msgOpt );
 260+ if ( wfEmptyMsg( $tname, $ttext ) ) $ttext = $gname;
 261+ $messages[$tname] = $ttext;
257262 }
258263 }
259264

Status & tagging log