Provide a base ULS RL module and seperate UI language selection

ULS is disabled for anonymous users on WMF projects. But to provide
rest of the features - apis, language database, language selection for
many use cases, we need to provide a minimal ULS. RL module
ext.uls.init does that job now.

For using ULS as interface language selection tool, new RL module
ext.uls.interface is introduced. That will add UI language selection,
webfonts, ime features, if enabled.

Change-Id: I796a7c9cce0de42bf8aa06b26e383e0075dbe1dd
This commit is contained in:
Santhosh Thottingal
2013-03-26 11:27:32 +05:30
committed by Gerrit Code Review
parent d4cea039b4
commit 453912fdf2
4 changed files with 226 additions and 184 deletions

View File

@@ -104,6 +104,7 @@ $wgHooks['UserGetLanguageObject'][] = 'UniversalLanguageSelectorHooks::getLangua
$wgDefaultUserOptions['uls-preferences'] = '';
$wgHooks['GetPreferences'][] = 'UniversalLanguageSelectorHooks::onGetPreferences';
/* Base ULS module */
$wgResourceModules['ext.uls.init'] = array(
'scripts' => 'resources/js/ext.uls.init.js',
'styles' => 'resources/css/ext.uls.css',
@@ -111,12 +112,24 @@ $wgResourceModules['ext.uls.init'] = array(
'remoteExtPath' => 'UniversalLanguageSelector',
'dependencies' => array(
'mediawiki.Uri',
'jquery.tipsy',
'mediawiki.util',
'jquery.json',
'jquery.uls',
'jquery.i18n',
),
'position' => 'top',
);
/* Interface language selection module */
$wgResourceModules['ext.uls.interface'] = array(
'scripts' => 'resources/js/ext.uls.interface.js',
'localBasePath' => $dir,
'remoteExtPath' => 'UniversalLanguageSelector',
'dependencies' => array(
'ext.uls.init',
'jquery.tipsy',
'ext.uls.displaysettings',
'ext.uls.inputsettings',
'ext.uls.geoclient'
),
'position' => 'top',
);