From: This, that and the other Date: Sat, 8 Nov 2014 08:39:32 +0000 (+1100) Subject: Don't fiddle with $wgLanguageCode in KkConverter X-Git-Tag: 1.31.0-rc.0~13316^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=4fe902a715ddc23abf6400287ff0f6c266615242;p=lhc%2Fweb%2Fwiklou.git Don't fiddle with $wgLanguageCode in KkConverter This was causing problems with the setlang= and uselang= parameters in the URL being ignored on kkwiki. Bug: 64440 Change-Id: I4e2a20c707fd4b9b8a581a9d14e04b6cfc8b4b5c --- diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index b649c2b3f5..7ab8772363 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -150,6 +150,9 @@ MediaWiki supports over 350 languages. Many localisations are updated regularly. Below only new and removed languages are listed, as well as changes to languages because of Bugzilla reports. +* (bug 64440) Kazakh (kk) wikis should no longer forcefully reset the user's + interface language to kk where unexpected. + === Other changes in 1.25 === * The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for diff --git a/languages/classes/LanguageKk.php b/languages/classes/LanguageKk.php index 1a09818077..39e62f5c89 100644 --- a/languages/classes/LanguageKk.php +++ b/languages/classes/LanguageKk.php @@ -279,27 +279,22 @@ class KkConverter extends LanguageConverter { * @return string */ function translate( $text, $toVariant ) { - global $wgLanguageCode; $text = parent::translate( $text, $toVariant ); switch ( $toVariant ) { case 'kk-cyrl': case 'kk-kz': $letters = KK_L_UC . KK_L_LC . 'ʺʹ#0123456789'; - $wgLanguageCode = 'kk'; break; case 'kk-latn': case 'kk-tr': $letters = KK_C_UC . KK_C_LC . '№0123456789'; - $wgLanguageCode = 'kk-Latn'; break; case 'kk-arab': case 'kk-cn': $letters = KK_C_UC . KK_C_LC . /*KK_L_UC.KK_L_LC.'ʺʹ'.*/',;\?%\*№0123456789'; - $wgLanguageCode = 'kk-Arab'; break; default: - $wgLanguageCode = 'kk'; return $text; } // disable conversion variables like $1, $2...