Index: branches/RL2/extensions/Gadgets/backend/Gadget.php |
— | — | @@ -139,7 +139,8 @@ |
140 | 140 | } |
141 | 141 | if ( !$msg->exists() ) { |
142 | 142 | // Fallback: return the name of the gadget |
143 | | - $lang = Language::factory( $langcode ); |
| 143 | + global $wgLang; |
| 144 | + $lang = $langcode === null ? $wgLang : Language::factory( $langcode ); |
144 | 145 | return $lang->ucfirst( $this->name ); |
145 | 146 | } |
146 | 147 | return $msg->plain(); |