diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 92755ae8e..84d3b6c2b 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -316,10 +316,6 @@ class SkinVector extends SkinMustache { $title = $out->getTitle(); $parentData = parent::getTemplateData(); - if ( $this->shouldHideLanguages() ) { - $parentData['data-portlets']['data-languages'] = null; - } - // Naming conventions for Mustache parameters. // // Value type (first segment): @@ -497,6 +493,13 @@ class SkinVector extends SkinMustache { // ext.uls.interface attaches click handler to this selector. ' mw-interlanguage-selector ', ]; + + // Adds class to hide language button + // Temporary solution to T287206, can be removed when ULS dialog includes interwiki links + if ( $this->shouldHideLanguages() ) { + $languageButtonData['class'] = ' mw-portlet-empty'; + } + return array_merge( $portletData, $languageButtonData ); } diff --git a/resources/skins.vector.js/languageButton.js b/resources/skins.vector.js/languageButton.js index 76d40f719..e9f78593a 100644 --- a/resources/skins.vector.js/languageButton.js +++ b/resources/skins.vector.js/languageButton.js @@ -1,3 +1,20 @@ +/** + * Copies interwiki links to sidebar + * + * Temporary solution to T287206, can be removed when the new ULS built in Vue.js + * has been released and contains this + */ +function addInterwikiLinkToSidebar() { + // eslint-disable-next-line no-jquery/no-global-selector + var $editLink = $( '#p-lang-btn .wbc-editpage' ); + if ( $editLink.length ) { + // Use title attribute for link text + $editLink.text( $editLink.attr( 'title' ) || '' ); + var $li = $( '