Don't fiddle with $wgLanguageCode in KkConverter
authorThis, that and the other <at.light@live.com.au>
Sat, 8 Nov 2014 08:39:32 +0000 (19:39 +1100)
committerFederico Leva <federicoleva@tiscali.it>
Tue, 11 Nov 2014 07:17:04 +0000 (08:17 +0100)
This was causing problems with the setlang= and uselang= parameters in the
URL being ignored on kkwiki.

Bug: 64440
Change-Id: I4e2a20c707fd4b9b8a581a9d14e04b6cfc8b4b5c

RELEASE-NOTES-1.25
languages/classes/LanguageKk.php

index b649c2b..7ab8772 100644 (file)
@@ -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
index 1a09818..39e62f5 100644 (file)
@@ -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...