Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/55864
Change subject: Add separate Resources.php ...................................................................... Add separate Resources.php Change-Id: Ie02fbdd1bb8a1c83f66eacff8de0ca0bd6c67ab4 --- A Resources.php M UniversalLanguageSelector.php 2 files changed, 191 insertions(+), 182 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/64/55864/1 diff --git a/Resources.php b/Resources.php new file mode 100644 index 0000000..6b7c725 --- /dev/null +++ b/Resources.php @@ -0,0 +1,190 @@ +<?php +/** + * JavaScript and CSS resource definitions. + * + * @file + * @license GPL2+ + */ + +// Base ULS module +$wgResourceModules['ext.uls.init'] = array( + 'scripts' => 'resources/js/ext.uls.init.js', + 'styles' => 'resources/css/ext.uls.css', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'mediawiki.Uri', + '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', + ), + 'position' => 'top', +); + +$wgResourceModules['ext.uls.geoclient'] = array( + 'scripts' => 'resources/js/ext.uls.geoclient.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', +); + +$wgResourceModules['ext.uls.preferences'] = array( + 'scripts' => 'resources/js/ext.uls.preferences.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'mediawiki.user', + 'mediawiki.api', + 'jquery.jStorage', + ), +); + +$wgResourceModules['ext.uls.languagesettings'] = array( + 'scripts' => 'resources/js/ext.uls.languagesettings.js', + 'styles' => 'resources/css/ext.uls.languagesettings.css', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'ext.uls.preferences', + ), +); + +$wgResourceModules['ext.uls.webfonts'] = array( + 'scripts' => 'resources/js/ext.uls.webfonts.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'jquery.webfonts', + 'ext.uls.webfonts.repository', + 'ext.uls.preferences', + ), +); +$wgResourceModules['ext.uls.ime'] = array( + 'scripts' => 'resources/js/ext.uls.ime.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'jquery.ime', + 'ext.uls.preferences', + ), +); + + +$wgResourceModules['ext.uls.displaysettings'] = array( + 'scripts' => 'resources/js/ext.uls.displaysettings.js', + 'styles' => 'resources/css/ext.uls.displaysettings.css', + 'localBasePath' => $dir, + 'dependencies' => array( + 'ext.uls.languagesettings', + 'ext.uls.webfonts', + 'jquery.i18n', + ), + 'remoteExtPath' => 'UniversalLanguageSelector', +); + +$wgResourceModules['ext.uls.inputsettings'] = array( + 'scripts' => 'resources/js/ext.uls.inputsettings.js', + 'styles' => 'resources/css/ext.uls.inputsettings.css', + 'localBasePath' => $dir, + 'dependencies' => array( + 'ext.uls.languagesettings', + 'ext.uls.ime', + 'jquery.i18n', + ), + 'remoteExtPath' => 'UniversalLanguageSelector', +); + +$wgResourceModules['jquery.uls'] = array( + 'scripts' => array( + 'lib/jquery.uls/src/jquery.uls.core.js', + 'lib/jquery.uls/src/jquery.uls.lcd.js', + 'lib/jquery.uls/src/jquery.uls.languagefilter.js', + 'lib/jquery.uls/src/jquery.uls.regionfilter.js', + ), + 'styles' => array( + 'lib/jquery.uls/css/jquery.uls.css', + 'lib/jquery.uls/css/jquery.uls.lcd.css', + ), + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'jquery.i18n', + 'jquery.uls.grid', + 'jquery.uls.data', + ), + 'position' => 'top', +); + + +$wgResourceModules['jquery.uls.grid'] = array( + 'styles' => array( + 'lib/jquery.uls/css/jquery.uls.grid.css', + ), + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'position' => 'top', +); + + +$wgResourceModules['jquery.uls.compact'] = array( + 'styles' => array( + 'lib/jquery.uls/css/jquery.uls.compact.css', + ), + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'dependencies' => array( + 'jquery.uls', + ), + 'position' => 'top', +); + +$wgResourceModules['jquery.uls.data'] = array( + 'scripts' => array( + 'lib/jquery.uls/src/jquery.uls.data.js', + 'lib/jquery.uls/src/jquery.uls.data.utils.js', + ), + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', + 'position' => 'top', +); + +$wgResourceModules['jquery.webfonts'] = array( + 'scripts' => 'lib/jquery.webfonts.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', +); + +$wgResourceModules['ext.uls.webfonts.repository'] = array( + 'scripts' => 'resources/js/ext.uls.webfonts.repository.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', +); + +$wgResourceModules['jquery.i18n'] = array( + 'scripts' => 'lib/jquery.i18n.js', + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', +); + +$wgResourceModules['jquery.ime'] = array( + 'scripts' => 'lib/jquery.ime/jquery.ime.js', + 'styles' => array( + 'lib/jquery.ime/css/jquery.ime.css', + ), + 'localBasePath' => $dir, + 'remoteExtPath' => 'UniversalLanguageSelector', +); diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php index 216bd3e..840571e 100644 --- a/UniversalLanguageSelector.php +++ b/UniversalLanguageSelector.php @@ -104,185 +104,4 @@ $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', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'mediawiki.Uri', - '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', - ), - 'position' => 'top', -); - -$wgResourceModules['ext.uls.geoclient'] = array( - 'scripts' => 'resources/js/ext.uls.geoclient.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', -); - -$wgResourceModules['ext.uls.preferences'] = array( - 'scripts' => 'resources/js/ext.uls.preferences.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'mediawiki.user', - 'mediawiki.api', - 'jquery.jStorage', - ), -); - -$wgResourceModules['ext.uls.languagesettings'] = array( - 'scripts' => 'resources/js/ext.uls.languagesettings.js', - 'styles' => 'resources/css/ext.uls.languagesettings.css', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'ext.uls.preferences', - ), -); - -$wgResourceModules['ext.uls.webfonts'] = array( - 'scripts' => 'resources/js/ext.uls.webfonts.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'jquery.webfonts', - 'ext.uls.webfonts.repository', - 'ext.uls.preferences', - ), -); -$wgResourceModules['ext.uls.ime'] = array( - 'scripts' => 'resources/js/ext.uls.ime.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'jquery.ime', - 'ext.uls.preferences', - ), -); - - -$wgResourceModules['ext.uls.displaysettings'] = array( - 'scripts' => 'resources/js/ext.uls.displaysettings.js', - 'styles' => 'resources/css/ext.uls.displaysettings.css', - 'localBasePath' => $dir, - 'dependencies' => array( - 'ext.uls.languagesettings', - 'ext.uls.webfonts', - 'jquery.i18n', - ), - 'remoteExtPath' => 'UniversalLanguageSelector', -); - -$wgResourceModules['ext.uls.inputsettings'] = array( - 'scripts' => 'resources/js/ext.uls.inputsettings.js', - 'styles' => 'resources/css/ext.uls.inputsettings.css', - 'localBasePath' => $dir, - 'dependencies' => array( - 'ext.uls.languagesettings', - 'ext.uls.ime', - 'jquery.i18n', - ), - 'remoteExtPath' => 'UniversalLanguageSelector', -); - -$wgResourceModules['jquery.uls'] = array( - 'scripts' => array( - 'lib/jquery.uls/src/jquery.uls.core.js', - 'lib/jquery.uls/src/jquery.uls.lcd.js', - 'lib/jquery.uls/src/jquery.uls.languagefilter.js', - 'lib/jquery.uls/src/jquery.uls.regionfilter.js', - ), - 'styles' => array( - 'lib/jquery.uls/css/jquery.uls.css', - 'lib/jquery.uls/css/jquery.uls.lcd.css', - ), - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'jquery.i18n', - 'jquery.uls.grid', - 'jquery.uls.data', - ), - 'position' => 'top', -); - - -$wgResourceModules['jquery.uls.grid'] = array( - 'styles' => array( - 'lib/jquery.uls/css/jquery.uls.grid.css', - ), - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'position' => 'top', -); - - -$wgResourceModules['jquery.uls.compact'] = array( - 'styles' => array( - 'lib/jquery.uls/css/jquery.uls.compact.css', - ), - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'dependencies' => array( - 'jquery.uls', - ), - 'position' => 'top', -); - -$wgResourceModules['jquery.uls.data'] = array( - 'scripts' => array( - 'lib/jquery.uls/src/jquery.uls.data.js', - 'lib/jquery.uls/src/jquery.uls.data.utils.js', - ), - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', - 'position' => 'top', -); - -$wgResourceModules['jquery.webfonts'] = array( - 'scripts' => 'lib/jquery.webfonts.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', -); - -$wgResourceModules['ext.uls.webfonts.repository'] = array( - 'scripts' => 'resources/js/ext.uls.webfonts.repository.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', -); - -$wgResourceModules['jquery.i18n'] = array( - 'scripts' => 'lib/jquery.i18n.js', - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', -); - -$wgResourceModules['jquery.ime'] = array( - 'scripts' => 'lib/jquery.ime/jquery.ime.js', - 'styles' => array( - 'lib/jquery.ime/css/jquery.ime.css', - ), - 'localBasePath' => $dir, - 'remoteExtPath' => 'UniversalLanguageSelector', -); +require( "$dir/Resources.php" ); -- To view, visit https://gerrit.wikimedia.org/r/55864 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie02fbdd1bb8a1c83f66eacff8de0ca0bd6c67ab4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits