mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
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:
parent
4f811920ed
commit
d751d569db
|
@ -280,8 +280,8 @@ $wgResourceModules += array(
|
|||
'jquery.visibleText',
|
||||
'jquery.byteLength',
|
||||
'jquery.client',
|
||||
'mediawiki.Uri',
|
||||
'mediawiki.api',
|
||||
'mediawiki.language',
|
||||
'mediawiki.Title',
|
||||
'mediawiki.Uri',
|
||||
'mediawiki.user',
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue