Index: trunk/extensions/Babel/Babel.class.php |
— | — | @@ -140,8 +140,9 @@ |
141 | 141 | global $wgBabelDefaultLevel, $wgBabelCategoryNames; |
142 | 142 | $return = array(); |
143 | 143 | |
| 144 | + $babelcode = strtolower( $parameter ); |
144 | 145 | // Try treating the paramter as a language code (for default level). |
145 | | - $code = BabelLanguageCodes::getCode( $parameter ); |
| 146 | + $code = BabelLanguageCodes::getCode( $babelcode ); |
146 | 147 | if ( $code !== false ) { |
147 | 148 | $return['code'] = $code; |
148 | 149 | $return['level'] = $wgBabelDefaultLevel; |
— | — | @@ -155,8 +156,9 @@ |
156 | 157 | $code = substr( $parameter, 0, $lastSplit ); |
157 | 158 | $level = substr( $parameter, $lastSplit + 1 ); |
158 | 159 | |
| 160 | + $babelcode = strtolower( $code ); |
159 | 161 | // Validate code. |
160 | | - $return['code'] = BabelLanguageCodes::getCode( $code ); |
| 162 | + $return['code'] = BabelLanguageCodes::getCode( $babelcode ); |
161 | 163 | if ( $return['code'] === false ) { |
162 | 164 | return false; |
163 | 165 | } |
— | — | @@ -182,6 +184,7 @@ |
183 | 185 | $lang = wfBCP47( $code ); |
184 | 186 | $header = "[[$portal|" . $lang . "]]<span class=\"mw-babel-box-level-$level\">-$level</span>"; |
185 | 187 | |
| 188 | + $code = strtolower( $code ); |
186 | 189 | $name = BabelLanguageCodes::getName( $code ); |
187 | 190 | $code = BabelLanguageCodes::getCode( $code ); |
188 | 191 | $text = self::mGetText( $name, $code, $level ); |