Require action menu items registry at the top of uls interface module
"ext.uls.actions.menu.items.registry.js" should be required at the top of the "ext.uls.interface.js" file. The latter is the main file of the "ext.uls.interface" module, and it's the only one that is executed when the module is added as an external dependency. Since, the "mw.uls.ActionsMenuItemsRegistry" object is needed outside ULS extension (inside ContentTranslation), the corresponding file should be required at the top of the main file so that it's available. Bug: T289840 Change-Id: I70ced03c09b7907c6dbf2aa35a29d5fd14b790e6
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
var languageSettingsModules = [ 'ext.uls.displaysettings' ],
|
||||
launchULS = require( './ext.uls.launch.js' ),
|
||||
ActionsMenu = require( './ext.uls.actions.menu.js' );
|
||||
require( './ext.uls.actions.menu.items.registry.js' );
|
||||
|
||||
/**
|
||||
* Construct the display settings link
|
||||
*
|
||||
@@ -140,7 +142,6 @@
|
||||
handler: openActionsMenuEventHandler
|
||||
};
|
||||
|
||||
require( './ext.uls.actions.menu.items.registry.js' );
|
||||
var actionItemsRegistry = mw.uls.ActionsMenuItemsRegistry;
|
||||
actionItemsRegistry.register( languageSettingsMenuItem );
|
||||
// first hide #uls-settings-block div since it's unused, and it causes
|
||||
|
||||
Reference in New Issue
Block a user