Index: branches/wmf/1.17wmf1/extensions/Babel/Babel.class.php |
— | — | @@ -199,8 +199,13 @@ |
200 | 200 | */ |
201 | 201 | protected static function mGenerateBox( $code, $level ) { |
202 | 202 | $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>"; |
205 | 210 | |
206 | 211 | $code = strtolower( $code ); |
207 | 212 | $name = BabelLanguageCodes::getName( $code ); |
Index: branches/wmf/1.17wmf1/extensions/Babel/Babel.i18n.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | 'babel-cellspacing' => '0', # Do not translate or duplicate this message to other languages. |
50 | 50 | 'babel-cellpadding' => '0', # Do not translate or duplicate this message to other languages. |
51 | 51 | |
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. |
53 | 53 | 'babel-template' => 'Template:$1', # Do not translate or duplicate this message to other languages. |
54 | 54 | |
55 | 55 | 'babel-footer' => 'Users by language', |