From 217aefdb7a19c9fad987b2c0344bef25e94c669a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Tue, 26 Jul 2016 15:27:53 +0200 Subject: [PATCH] Move als->gsw override to ext.uls.init So that it is loaded for compact language links. The ext.mediawiki.uls module is starting to look very empty now can could be removed easily in follow-up. ext.uls.init depends on jquery.uls.data so this is safe. Bug: T139949 Change-Id: Icac10f073e122284723c48782c2a1cf7f10b45ec --- resources/js/ext.uls.init.js | 10 ++++++++++ resources/js/ext.uls.mediawiki.js | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js index 9fbd63d9..0e10fbcb 100644 --- a/resources/js/ext.uls.init.js +++ b/resources/js/ext.uls.init.js @@ -20,6 +20,16 @@ ( function ( $, mw ) { 'use strict'; + /* + * The 'als' is used in a non-standard way in MediaWiki - + * it may be used to represent the Allemanic language, + * the standard code of which is 'gsw', while 'als' + * is ISO 639 3 refers to Tosk Albanian, which is + * not currently used in any way in MediaWiki. + * This local fix adds a redirect for it. + */ + $.uls.data.addLanguage( 'als', { target: 'gsw' } ); + mw.uls = mw.uls || {}; mw.uls.previousLanguagesStorageKey = 'uls-previous-languages'; mw.uls.languageSettingsModules = [ 'ext.uls.inputsettings', 'ext.uls.displaysettings' ]; diff --git a/resources/js/ext.uls.mediawiki.js b/resources/js/ext.uls.mediawiki.js index 8be67082..73e055df 100644 --- a/resources/js/ext.uls.mediawiki.js +++ b/resources/js/ext.uls.mediawiki.js @@ -30,14 +30,4 @@ $.fn.uls.Constructor.prototype.render = function () { this.$languageFilter.addClass( 'noime' ); }; - - /* - * The 'als' is used in a non-standard way in MediaWiki - - * it may be used to represent the Allemanic language, - * the standard code of which is 'gsw', while 'als' - * is ISO 639 3 refers to Tosk Albanian, which is - * not currently used in any way in MediaWiki. - * This local fix adds a redirect for it. - */ - $.uls.data.addLanguage( 'als', { target: 'gsw' } ); }( jQuery, mediaWiki ) );