jenkins-bot has submitted this change and it was merged. Change subject: Update jquery.uls from upstream ......................................................................
Update jquery.uls from upstream * Localization added for Belarusian * Code cleanup in jquery.uls.core.js * Call proper cancel function on pressing the cancel button * Remove the unused option menu Change-Id: I4482c6c63d93bdbc520bf3d505288b4b88c66eab --- A lib/jquery.uls/i18n/be.json M lib/jquery.uls/src/jquery.uls.core.js 2 files changed, 40 insertions(+), 20 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.uls/i18n/be.json b/lib/jquery.uls/i18n/be.json new file mode 100644 index 0000000..a1b3d1f --- /dev/null +++ b/lib/jquery.uls/i18n/be.json @@ -0,0 +1,21 @@ +{ + "@metadata": { + "authors": [ + "Unomano" + ] + }, + "uls-select-language": "Выберыце мову", + "uls-region-WW": "Па ўсім свеце", + "uls-region-SP": "Спецыяльныя", + "uls-region-AM": "Амерыка", + "uls-region-AF": "Афрыка", + "uls-region-EU": "Еўропа", + "uls-region-AS": "Азія", + "uls-region-ME": "Блізкі Ўсход", + "uls-region-PA": "Ціхі акіян", + "uls-no-results-found": "Нічога не знойдзена", + "uls-common-languages": "Распаўсюджаныя мовы", + "uls-no-results-suggestion-title": "Вы можаце быць зацікаўлены ў:", + "uls-search-help": "Вы можаце шукаць па мове, назве сцэнара, ISO-коду мовы, або вы можаце праглядаць па рэгіенах:", + "uls-search-placeholder": "Ппошук мовы" +} diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index 6a9536e..5f9d837 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -242,46 +242,46 @@ uls = this; // Register all event listeners to the ULS here. - uls.$element.on( 'click', $.proxy( uls.click, uls ) ); + this.$element.on( 'click', $.proxy( this.click, this ) ); - uls.$languageFilter.on( 'searchclear.uls', $.proxy( uls.defaultSearch, uls ) ); - uls.$languageFilter.on( 'noresults.uls', $.proxy( uls.noresults, uls ) ); - uls.$languageFilter.on( 'resultsfound.uls', $.proxy( uls.success, uls ) ); + this.$languageFilter.on( 'searchclear.uls', $.proxy( this.defaultSearch, this ) ); + this.$languageFilter.on( 'noresults.uls', $.proxy( this.noresults, this ) ); + this.$languageFilter.on( 'resultsfound.uls', $.proxy( this.success, this ) ); // Close when clicking on the close button - uls.$menu.find( '#uls-close' ).on( 'click', $.proxy( uls.cancel, uls ) ); + this.$menu.find( '#uls-close' ).on( 'click', $.proxy( this.cancel, this ) ); // Don't do anything if pressing on empty space in the ULS - uls.$menu.on( 'click', function ( e ) { + this.$menu.on( 'click', function ( e ) { e.stopPropagation(); } ); // Handle key press events on the menu - uls.$menu.on( 'keypress', $.proxy( this.keypress, this ) ) + this.$menu.on( 'keypress', $.proxy( this.keypress, this ) ) .on( 'keyup', $.proxy( this.keyup, this ) ); if ( this.eventSupported( 'keydown' ) ) { this.$menu.on( 'keydown', $.proxy( this.keypress, this ) ); } - lcd = uls.$resultsView.lcd( { - languages: uls.languages, - quickList: uls.options.quickList, - clickhandler: $.proxy( uls.select, uls ), - source: uls.$languageFilter, - showRegions: uls.options.showRegions + lcd = this.$resultsView.lcd( { + languages: this.languages, + quickList: this.options.quickList, + clickhandler: $.proxy( this.select, this ), + source: this.$languageFilter, + showRegions: this.options.showRegions } ).data( 'lcd' ); - uls.$languageFilter.languagefilter( { + this.$languageFilter.languagefilter( { $target: lcd, - languages: uls.languages, - searchAPI: uls.options.searchAPI, - onSelect: $.proxy( uls.select, uls ) + languages: this.languages, + searchAPI: this.options.searchAPI, + onSelect: $.proxy( this.select, this ) } ); // Create region selectors, one per region this.$menu.find( '.uls-region, .uls-region-link' ).regionselector( { $target: lcd, - languages: uls.languages, + languages: this.languages, success: function ( regionfilter ) { // Deactivate search filtering uls.$languageFilter.languagefilter( 'deactivate' ); @@ -299,7 +299,7 @@ } } ); - $( 'html' ).click( $.proxy( this.hide, this ) ); + $( 'html' ).click( $.proxy( this.cancel, this ) ); }, /** @@ -396,7 +396,6 @@ }; $.fn.uls.defaults = { - menu: template, onSelect: null, // Callback function to be called when a language is selected searchAPI: null, // Language search API languages: $.uls.data.getAutonyms(), // Languages to be used for ULS, default is all languages -- To view, visit https://gerrit.wikimedia.org/r/133211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4482c6c63d93bdbc520bf3d505288b4b88c66eab Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits