diff --git a/includes/UniversalLanguageSelectorHooks.php b/includes/UniversalLanguageSelectorHooks.php index 01530889..207f124f 100644 --- a/includes/UniversalLanguageSelectorHooks.php +++ b/includes/UniversalLanguageSelectorHooks.php @@ -424,7 +424,7 @@ class UniversalLanguageSelectorHooks { 'section' => 'personal/i18n', // We use this class to hide this from no-JS users 'cssclass' => 'uls-preferences-link-wrapper', - 'default' => "" . + 'default' => "" . wfMessage( 'ext-uls-language-settings-preferences-link' )->escaped() . "", ]; diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 75f68583..5b923253 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -234,116 +234,108 @@ } ); } - function initInterface() { - var $pLang, - clickHandler, - // T273928: No change to the heading should be made in modern Vector when the language - // button is present - isButton = isUsingStandaloneLanguageButton(), - $trigger = $( '.uls-trigger' ), - anonMode = ( mw.user.isAnon() && - !mw.config.get( 'wgULSAnonCanChangeLanguage' ) ), - configPosition = mw.config.get( 'wgULSPosition' ); + function initSecondaryEntryPoints() { + $( '.uls-settings-trigger' ).one( 'click', function ( e ) { + e.preventDefault(); + mw.loader.using( languageSettingsModules, function () { + $( e.target ).languagesettings(); + $( e.target ).trigger( 'click' ); + } ); + } ); + } - if ( !mw.config.get( 'wgULSisCompactLinksEnabled' ) ) { - // The wgULSisCompactLinksEnabled flag when disabled will not render a language button to the page - // Skins can control where the button is placed, by adding an element with mw-interlanguage-selector to the page, - // the display of which is not impacted by this flag. To signal to these skins that the language button should be - // disabled, the class is removed. - $( '.mw-interlanguage-selector' ).removeClass( 'mw-interlanguage-selector' ); - return; + function initInterlanguageEntryPoint() { + var $pLang = $( '#p-lang' ); + + var $trigger = $( '