launchULS: Add context to interface.language.change hook
Now that the interface.language.change hook is fired when the user switches language using the Compact Language Switcher, we should provide additional context to the UniversalLanguageSelector instrument. Bug: T280770 Change-Id: I6c4ddf9738e527ac42581c9fb4924ed1d12748b4
This commit is contained in:
@@ -61,7 +61,10 @@ function launchULS( $trigger, languagesObject, forCLS ) {
|
||||
return;
|
||||
}
|
||||
|
||||
mw.hook( 'mw.uls.interface.language.change' ).fire( language );
|
||||
// TODO: The name of this hook should probably be changed to reflect that it covers
|
||||
// both the user changing their interface language and the user switching to a
|
||||
// different language.
|
||||
mw.hook( 'mw.uls.interface.language.change' ).fire( language, 'content-language-switcher' );
|
||||
|
||||
location.href = languagesObject[ language ].href;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user