Remove module 'jquery.i18n'
Since MediaWiki 1.26 the module 'jquery.i18n' is in core: git blame origin/REL1_26 -- resources/Resources.php Bug: T153635 Change-Id: Ie4cf86dd5020a75456cfe183b26c114437eb22e0
This commit is contained in:
@@ -460,59 +460,13 @@ class UniversalLanguageSelectorHooks {
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditionally register jquery.18n (backwards copatbility for those on pre-MediaWiki 1.26).
|
||||
* Conditionally register module ext.uls.eventlogger.
|
||||
*
|
||||
* @param ResourceLoader $resourceLoader
|
||||
* @return boolean true
|
||||
*/
|
||||
public static function onResourceLoaderRegisterModules( ResourceLoader $resourceLoader ) {
|
||||
global $wgResourceModules, $wgULSEventLogging;
|
||||
|
||||
if (
|
||||
(
|
||||
(
|
||||
is_callable( [ $resourceLoader, 'isModuleRegistered' ] ) &&
|
||||
!$resourceLoader->isModuleRegistered( 'jquery.i18n' )
|
||||
)
|
||||
||
|
||||
$resourceLoader->getModule( 'jquery.i18n' ) === null
|
||||
)
|
||||
&&
|
||||
!isset( $wgResourceModules[ 'jquery.i18n' ] )
|
||||
) {
|
||||
$resourceLoader->register( [
|
||||
'jquery.i18n' => [
|
||||
'scripts' => [
|
||||
'lib/jquery.i18n/jquery.i18n.js',
|
||||
'lib/jquery.i18n/jquery.i18n.messagestore.js',
|
||||
'lib/jquery.i18n/jquery.i18n.parser.js',
|
||||
'lib/jquery.i18n/jquery.i18n.emitter.js',
|
||||
'lib/jquery.i18n/jquery.i18n.emitter.bidi.js',
|
||||
'lib/jquery.i18n/jquery.i18n.language.js',
|
||||
],
|
||||
'dependencies' => 'mediawiki.libs.pluralruleparser',
|
||||
'languageScripts' => [
|
||||
'bs' => 'lib/jquery.i18n/languages/bs.js',
|
||||
'dsb' => 'lib/jquery.i18n/languages/dsb.js',
|
||||
'fi' => 'lib/jquery.i18n/languages/fi.js',
|
||||
'ga' => 'lib/jquery.i18n/languages/ga.js',
|
||||
'he' => 'lib/jquery.i18n/languages/he.js',
|
||||
'hsb' => 'lib/jquery.i18n/languages/hsb.js',
|
||||
'hu' => 'lib/jquery.i18n/languages/hu.js',
|
||||
'hy' => 'lib/jquery.i18n/languages/hy.js',
|
||||
'la' => 'lib/jquery.i18n/languages/la.js',
|
||||
'ml' => 'lib/jquery.i18n/languages/ml.js',
|
||||
'os' => 'lib/jquery.i18n/languages/os.js',
|
||||
'ru' => 'lib/jquery.i18n/languages/ru.js',
|
||||
'sl' => 'lib/jquery.i18n/languages/sl.js',
|
||||
'uk' => 'lib/jquery.i18n/languages/uk.js',
|
||||
],
|
||||
'targets' => [ 'desktop', 'mobile' ],
|
||||
'localBasePath' => __DIR__,
|
||||
'remoteExtPath' => 'UniversalLanguageSelector',
|
||||
]
|
||||
] );
|
||||
}
|
||||
global $wgULSEventLogging;
|
||||
|
||||
if ( $wgULSEventLogging ) {
|
||||
$resourceLoader->register( [
|
||||
|
||||
Reference in New Issue
Block a user