Internationalize ULS

* Integrate jquery.i18n
* Update jquery.uls from upstream and use the build version

Change-Id: I523444b1f6b177f14a4799a455a16a14649b0e1b
This commit is contained in:
Santhosh Thottingal
2012-09-22 10:12:35 -07:00
parent e1a4f7f0cb
commit a13f9b739d
34 changed files with 4432 additions and 3771 deletions

View File

@@ -87,6 +87,14 @@
};
$( document ).ready( function () {
// i18n initialization
var i18n = $.i18n( {
locale: currentLang
} );
var extensionPath = mw.config.get( 'wgExtensionAssetsPath' ) +
'/UniversalLanguageSelector/';
i18n.load( extensionPath + 'lib/jquery.uls/i18n/' + currentLang + ".json", currentLang );
var $ulsTrigger = $( '.uls-trigger' ),
previousLanguages = mw.uls.getPreviousLanguages() || [],
previousLang = previousLanguages.slice( -1 )[0];