r85936 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85935‎ | r85936 | r85937 >
Date:03:36, 13 April 2011
Author:kaldari
Status:deferred
Tags:
Comment:
some helpful comments
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.LanguageUpWiz.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.LanguageUpWiz.js
@@ -17,6 +17,7 @@
1818
1919 /**
2020 * List of default languages
 21+ * Make sure you have language templates set up for each of these on your wiki, e.g. {{en}}
2122 */
2223 languages: [
2324 { lang: "de", text: "Deutsch" },
@@ -41,17 +42,20 @@
4243 if ( mw.LanguageUpWiz.initialized ) {
4344 return;
4445 }
 46+ // if a language list is defined locally (MediaWiki:LanguageHandler.js), use that list instead
4547 if ( typeof LanguageHandler != 'undefined' ) {
4648 this.languages = LanguageHandler.languages;
4749 }
4850 mw.LanguageUpWiz._codes = {};
4951 var select = $j( '<select/>' );
5052 $j.each( mw.LanguageUpWiz.languages, function( i, language ) {
 53+ // add an option for each language
5154 select.append(
5255 $j( '<option>' )
5356 .attr( 'value', language.lang )
5457 .append( language.text )
5558 );
 59+ // add each language into dictionary
5660 mw.LanguageUpWiz._codes[language.lang] = language.text;
5761 } );
5862 mw.LanguageUpWiz.$_select = select;

Status & tagging log