mw.Platform: Use 'mediawiki.language' for language fallback chain

Bonus:
* Remove doubled dependency on mediawiki.Uri
* Add missing dependency on mediawiki.language

Change-Id: Ide716aad7b9f08ae9a24f99812f07273d89da33a
This commit is contained in:
Bartosz Dziewoński 2014-10-05 20:57:53 +02:00
parent 4f811920ed
commit d751d569db
2 changed files with 2 additions and 10 deletions

View file

@ -280,8 +280,8 @@ $wgResourceModules += array(
'jquery.visibleText',
'jquery.byteLength',
'jquery.client',
'mediawiki.Uri',
'mediawiki.api',
'mediawiki.language',
'mediawiki.Title',
'mediawiki.Uri',
'mediawiki.user',

View file

@ -105,15 +105,7 @@ ve.init.mw.Platform.prototype.getLanguageDirection = $.uls.data.getDir;
/** @inheritdoc */
ve.init.mw.Platform.prototype.getUserLanguages = function () {
var lang = mw.config.get( 'wgUserLanguage' ),
langParts = lang.split( '-' ),
langs = [ lang ];
if ( langParts.length > 1 ) {
langs.push( langParts[0] );
}
return langs;
return mw.language.getFallbackLanguageChain();
};
/* Initialization */