jenkins-bot has submitted this change and it was merged.

Change subject: Fix a few remaining things in mw.LanguageUpWiz.js
......................................................................


Fix a few remaining things in mw.LanguageUpWiz.js

Followup to Ia684ab3b

Bug: 53245
Change-Id: I40a3357a70fc8466437c77dc35a6aee2ce95403b
---
M resources/mw.LanguageUpWiz.js
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Mattflaschen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mw.LanguageUpWiz.js b/resources/mw.LanguageUpWiz.js
index e05c1fa..e9f4ca1 100644
--- a/resources/mw.LanguageUpWiz.js
+++ b/resources/mw.LanguageUpWiz.js
@@ -42,20 +42,20 @@
         * 2) dict of language code to name -- useful for testing for 
existence, maybe other things.
         */
        initialize: function() {
-               var langs, langcode;
+               var langs, langcode,
+                       thisUri = new mw.Uri( window.location.href, { 
overrideKeys: true } ),
+                       $select = $( '<select>' );
                if ( mw.LanguageUpWiz.initialized ) {
                        return;
                }
                mw.LanguageUpWiz.languages = [];
                langs = mw.UploadWizard.config.uwLanguages;
                for ( langcode in langs ) {
-                       mw.LanguageUpWiz.languages.push( { code: langcode, 
text: langs[langcode] } );
+                       mw.LanguageUpWiz.languages.push( { code: langcode, 
text: langs[langcode] } );
                }
 
                // If a descriptionlang param is passed in the query string, 
use that,
                // otherwise choose a good default for the description language.
-               var thisUri = new mw.Uri( window.location.href, { overrideKeys: 
true } ),
-                       $select = $( '<select>' );
 
                if ( thisUri.query.descriptionlang && 
mw.LanguageUpWiz.checkForLang( thisUri.query.descriptionlang ) ) {
                        mw.LanguageUpWiz.defaultCode = 
thisUri.query.descriptionlang;
@@ -69,7 +69,7 @@
                        mw.LanguageUpWiz.defaultCode = 
mw.LanguageUpWiz.languages[0].code;
                }
 
-               mw.LanguageUpWiz._codes = {};
+               mw.LanguageUpWiz.codes = {};
                $.each( mw.LanguageUpWiz.languages, function( i, language ) {
                        // add an option for each language
                        var $opt = $( '<option>' )
@@ -80,7 +80,7 @@
                        $select.append( $opt );
 
                        // add each language into dictionary
-                       mw.LanguageUpWiz._codes[language.code] = language.text;
+                       mw.LanguageUpWiz.codes[language.code] = language.text;
                } );
 
                mw.LanguageUpWiz.$select = $select;
@@ -144,7 +144,7 @@
                }
                if ( code === 'nan' || code === 'minnan' ) {
                        return 'zh-min-nan';
-               } else if ( mw.LanguageUpWiz._codes[code] !== undefined ) {
+               } else if ( mw.LanguageUpWiz.codes[code] !== undefined ) {
                        return code;
                }
                return mw.LanguageUpWiz.getClosest( code.substring( 0, 
code.indexOf( '-' )) );

-- 
To view, visit https://gerrit.wikimedia.org/r/88476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I40a3357a70fc8466437c77dc35a6aee2ce95403b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to