Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | /** |
17 | 17 | * Version number used in extension credits and in other placed where needed. |
18 | 18 | */ |
19 | | -define( 'TRANSLATE_VERSION', '2011-10-27' ); |
| 19 | +define( 'TRANSLATE_VERSION', '2011-10-30' ); |
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Extension credits properties. |
Index: trunk/extensions/Translate/README |
— | — | @@ -29,6 +29,8 @@ |
30 | 30 | http://translatewiki.net/docs/Translate/html/ |
31 | 31 | |
32 | 32 | == Change log == |
| 33 | +* 2011-10-30 |
| 34 | +- Fixed compatibility with MW 1.17 |
33 | 35 | * 2011-10-28 |
34 | 36 | - New configuration variable $wgTranslatePermissionUrl |
35 | 37 | - Message review feature, available to users in translate-proofr group |
Index: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | protected function getMainColumnCell( $code, $params ) { |
184 | 184 | if ( !isset( $this->names ) ) { |
185 | 185 | global $wgLang; |
186 | | - $this->names = Language::getTranslatedLanguageNames( $wgLang->getCode() ); |
| 186 | + $this->names = TranslateUtils::getLanguageNames( $wgLang->getCode() ); |
187 | 187 | $this->translate = SpecialPage::getTitleFor( 'Translate' ); |
188 | 188 | } |
189 | 189 | |
Index: trunk/extensions/Translate/TranslateUtils.php |
— | — | @@ -170,15 +170,7 @@ |
171 | 171 | * @return string |
172 | 172 | */ |
173 | 173 | public static function languageSelector( $language, $selectedId ) { |
174 | | - if ( is_callable( array( 'LanguageNames', 'getNames' ) ) ) { |
175 | | - $languages = LanguageNames::getNames( $language, |
176 | | - LanguageNames::FALLBACK_NORMAL, |
177 | | - LanguageNames::LIST_MW |
178 | | - ); |
179 | | - } else { |
180 | | - $languages = Language::getLanguageNames( false ); |
181 | | - } |
182 | | - |
| 174 | + $languages = self::getLanguageNames( $language ); |
183 | 175 | ksort( $languages ); |
184 | 176 | |
185 | 177 | $selector = new XmlSelect( 'language', 'language' ); |
— | — | @@ -191,6 +183,23 @@ |
192 | 184 | } |
193 | 185 | |
194 | 186 | /** |
| 187 | + * Get translated language names. |
| 188 | + * @return array |
| 189 | + */ |
| 190 | + public static function getLanguageNames( /*string */ $code ) { |
| 191 | + if ( is_callable( array( 'Language', 'getTranslatedLanguageNames' ) ) ) { |
| 192 | + return Language::getTranslatedLanguageNames( $code ); |
| 193 | + } elseif ( is_callable( array( 'LanguageNames', 'getNames' ) ) ) { |
| 194 | + return LanguageNames::getNames( $code, |
| 195 | + LanguageNames::FALLBACK_NORMAL, |
| 196 | + LanguageNames::LIST_MW |
| 197 | + ); |
| 198 | + } else { |
| 199 | + return Language::getLanguageNames( false ); |
| 200 | + } |
| 201 | + } |
| 202 | + |
| 203 | + /** |
195 | 204 | * Returns the primary group message belongs to. |
196 | 205 | * @param $namespace \int |
197 | 206 | * @param $key \string |