mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-15 03:23:51 +00:00
fixed fallback to content lang, behavior for special:allmessages is a bit odd now. needs some more thought.
This commit is contained in:
parent
e6010c67cc
commit
b2bcce951b
|
@ -243,16 +243,21 @@ function wfGadgetsInjectMessages() {
|
|||
if ( !$gadgets ) return true;
|
||||
|
||||
$messages = array();
|
||||
$msgOpt = array( 'parseinline' );
|
||||
|
||||
foreach ( $gadgets as $section => $entries ) {
|
||||
if ( $section !== false && $section !== '' ) {
|
||||
$tname = "gadget-section-$section";
|
||||
$messages[$tname] = $section;
|
||||
$ttext = wfMsgExt( $tname, $msgOpt );
|
||||
if ( wfEmptyMsg( $tname, $ttext ) ) $ttext = $section;
|
||||
$messages[$tname] = $ttext;
|
||||
}
|
||||
|
||||
foreach ( $entries as $gname => $code ) {
|
||||
$tname = "gadget-$gname";
|
||||
$messages[$tname] = $gname;
|
||||
$ttext = wfMsgExt( $tname, $msgOpt );
|
||||
if ( wfEmptyMsg( $tname, $ttext ) ) $ttext = $gname;
|
||||
$messages[$tname] = $ttext;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue