Update jquery.uls to c9c2056

Changes:
* Localization updates.
* Update language-data to 9a506b9.
* Allow identifying the context of the different ULS panels within one
 app.
* Convert ulsPurpose from a data attribute to an languagefilter option.

Change-Id: I7805ce226b0f8db8545b126c331e2a5915021a3c
This commit is contained in:
Kartik Mistry
2018-03-05 11:16:39 +05:30
parent 67d470a9e7
commit 6226f80b81
6 changed files with 169 additions and 9 deletions

View File

@@ -13,8 +13,9 @@
"uls-region-AS": "Ази", "uls-region-AS": "Ази",
"uls-region-ME": "Малти хӗвел тухӑҫ", "uls-region-ME": "Малти хӗвел тухӑҫ",
"uls-region-PA": "Океани", "uls-region-PA": "Океани",
"uls-region-all": "Мӗн пур чӗлхе",
"uls-no-results-found": "Нимӗн те тупӑнмарӗ", "uls-no-results-found": "Нимӗн те тупӑнмарӗ",
"uls-common-languages": "Чӗлхене сис", "uls-common-languages": "Сӗннӗ чӗлхесем",
"uls-no-results-suggestion-title": "Тен çак чĕлхесем пăхма пултаратăр:", "uls-no-results-suggestion-title": "Тен çак чĕлхесем пăхма пултаратăр:",
"uls-search-help": "Чĕлхе ячĕпе, çырулăхĕпе, ISO-кочĕпе е регионĕпе шырама пулать:", "uls-search-help": "Чĕлхе ячĕпе, çырулăхĕпе, ISO-кочĕпе е регионĕпе шырама пулать:",
"uls-search-placeholder": "Чĕлхе шыра" "uls-search-placeholder": "Чĕлхе шыра"

View File

@@ -10,7 +10,7 @@
"Gırd" "Gırd"
] ]
}, },
"uls-region-WW": "Heradınya", "uls-region-WW": "Dınyayi",
"uls-region-SP": "Xısusi", "uls-region-SP": "Xısusi",
"uls-region-AM": "Amerika", "uls-region-AM": "Amerika",
"uls-region-AF": "Afriqa", "uls-region-AF": "Afriqa",

View File

@@ -3,7 +3,8 @@
"authors": [ "authors": [
"Kaajawa", "Kaajawa",
"Mahitgar", "Mahitgar",
"V.narsikar" "V.narsikar",
"Sureshkhole"
] ]
}, },
"uls-region-WW": "वैश्विक", "uls-region-WW": "वैश्विक",
@@ -14,9 +15,10 @@
"uls-region-AS": "आशिया", "uls-region-AS": "आशिया",
"uls-region-ME": "मध्यपूर्व (मिडल इस्ट)", "uls-region-ME": "मध्यपूर्व (मिडल इस्ट)",
"uls-region-PA": "पॅसिफीक", "uls-region-PA": "पॅसिफीक",
"uls-region-all": "सर्व भाषा",
"uls-no-results-found": "परिणाम सापडले नाही", "uls-no-results-found": "परिणाम सापडले नाही",
"uls-common-languages": "नित्याच्या भाषा", "uls-common-languages": "सुचविलेल्या भाषा",
"uls-no-results-suggestion-title": "तुम्हाला कदाचित यात रुची असेल:", "uls-no-results-suggestion-title": "तुम्हाला कदाचित यात रुची असेल:",
"uls-search-help": "आपण भाषेनुसार, लिपीनुसार, भाषेच्या आयएसओ कोडनुसार शोध घेऊ शकता अथवा प्रदेशानुसार न्याहाळु शकता:", "uls-search-help": "आपण भाषेनुसार, लिपीनुसार, भाषेच्या आयएसओ कोडनुसार शोध घेऊ शकता अथवा प्रदेशानुसार शोधु शकता:",
"uls-search-placeholder": "भाषेचा शोध घ्या" "uls-search-placeholder": "भाषेचा शोध घ्या"
} }

View File

@@ -230,6 +230,7 @@
this.$languageFilter.languagefilter( { this.$languageFilter.languagefilter( {
lcd: lcd, lcd: lcd,
languages: this.languages, languages: this.languages,
ulsPurpose: this.options.ulsPurpose,
searchAPI: this.options.searchAPI, searchAPI: this.options.searchAPI,
onSelect: $.proxy( this.select, this ) onSelect: $.proxy( this.select, this )
} ); } );
@@ -393,6 +394,10 @@
// The options are wide (4 columns), medium (2 columns), and narrow (1 column). // The options are wide (4 columns), medium (2 columns), and narrow (1 column).
// If not specified, it will be set automatically. // If not specified, it will be set automatically.
menuWidth: undefined, menuWidth: undefined,
// What is this ULS used for.
// Should be set for distinguishing between different instances of ULS
// in the same application.
ulsPurpose: '',
// Used by LCD // Used by LCD
quickList: [], quickList: [],
// Used by LCD // Used by LCD

View File

@@ -1,4 +1,4 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
module.exports=( function ( $ ) { module.exports=( function ( $ ) {
$.uls = $.uls || {}; $.uls = $.uls || {};
$.uls.data = { $.uls.data = {
@@ -17,6 +17,13 @@ module.exports=( function ( $ ) {
], ],
"Аҧсшәа" "Аҧсшәа"
], ],
"abe": [
"Latn",
[
"AM"
],
"Wôbanakiôdwawôgan"
],
"abs": [ "abs": [
"Latn", "Latn",
[ [
@@ -561,6 +568,13 @@ module.exports=( function ( $ ) {
"chm": [ "chm": [
"mhr" "mhr"
], ],
"chn": [
"Latn",
[
"AM"
],
"chinuk wawa"
],
"cho": [ "cho": [
"Latn", "Latn",
[ [
@@ -937,6 +951,13 @@ module.exports=( function ( $ ) {
], ],
"estremeñu" "estremeñu"
], ],
"eya": [
"Latn",
[
"AM"
],
"I·ya·q"
],
"fa": [ "fa": [
"Arab", "Arab",
[ [
@@ -986,6 +1007,13 @@ module.exports=( function ( $ ) {
], ],
"Na Vosa Vakaviti" "Na Vosa Vakaviti"
], ],
"fkv": [
"Latn",
[
"EU"
],
"kvääni"
],
"fo": [ "fo": [
"Latn", "Latn",
[ [
@@ -1023,6 +1051,13 @@ module.exports=( function ( $ ) {
], ],
"Nordfriisk" "Nordfriisk"
], ],
"fuf": [
"Latn",
[
"AF"
],
"Fuuta Jalon"
],
"fur": [ "fur": [
"Latn", "Latn",
[ [
@@ -1096,6 +1131,13 @@ module.exports=( function ( $ ) {
], ],
"Guadeloupean Creole French" "Guadeloupean Creole French"
], ],
"gcr": [
"Latn",
[
"AM"
],
"kréyòl gwiyanè"
],
"gd": [ "gd": [
"Latn", "Latn",
[ [
@@ -1103,6 +1145,13 @@ module.exports=( function ( $ ) {
], ],
"Gàidhlig" "Gàidhlig"
], ],
"gez": [
"Ethi",
[
"AF"
],
"ግዕዝ"
],
"gl": [ "gl": [
"Latn", "Latn",
[ [
@@ -1215,6 +1264,13 @@ module.exports=( function ( $ ) {
"ha": [ "ha": [
"ha-latn" "ha-latn"
], ],
"hai": [
"Latn",
[
"AM"
],
"X̱aat Kíl"
],
"hak": [ "hak": [
"Latn", "Latn",
[ [
@@ -1724,6 +1780,13 @@ module.exports=( function ( $ ) {
], ],
"Перем Коми" "Перем Коми"
], ],
"koy": [
"Latn",
[
"AM"
],
"Denaakkenaageʼ"
],
"kr": [ "kr": [
"Latn", "Latn",
[ [
@@ -2178,6 +2241,13 @@ module.exports=( function ( $ ) {
], ],
"молдовеняскэ" "молдовеняскэ"
], ],
"moe": [
"Latn",
[
"AM"
],
"Innu-aimun"
],
"mr": [ "mr": [
"Deva", "Deva",
[ [
@@ -2402,6 +2472,13 @@ module.exports=( function ( $ ) {
], ],
"ߒߞߏ" "ߒߞߏ"
], ],
"nr": [
"Latn",
[
"AF"
],
"isiNdebele seSewula"
],
"nrm": [ "nrm": [
"Latn", "Latn",
[ [
@@ -2459,6 +2536,13 @@ module.exports=( function ( $ ) {
], ],
"Oromoo" "Oromoo"
], ],
"ood": [
"Latn",
[
"AM"
],
"ʼOʼodham ha-ñeʼokĭ"
],
"or": [ "or": [
"Orya", "Orya",
[ [
@@ -2577,6 +2661,13 @@ module.exports=( function ( $ ) {
], ],
"Pijin" "Pijin"
], ],
"pjt": [
"Latn",
[
"PA"
],
"Pitjantjatjara"
],
"pko": [ "pko": [
"Latn", "Latn",
[ [
@@ -2669,6 +2760,13 @@ module.exports=( function ( $ ) {
], ],
"Runa Simi" "Runa Simi"
], ],
"quc": [
"Latn",
[
"AM"
],
"K'iche'"
],
"qug": [ "qug": [
"Latn", "Latn",
[ [
@@ -2676,6 +2774,13 @@ module.exports=( function ( $ ) {
], ],
"Runa shimi" "Runa shimi"
], ],
"qwh": [
"Latn",
[
"AM"
],
"anqash qichwa"
],
"rap": [ "rap": [
"Latn", "Latn",
[ [
@@ -2914,7 +3019,7 @@ module.exports=( function ( $ ) {
[ [
"EU" "EU"
], ],
"sámegiella" "davvisámegiella"
], ],
"ses": [ "ses": [
"Latn", "Latn",
@@ -2989,6 +3094,20 @@ module.exports=( function ( $ ) {
], ],
"Simple English" "Simple English"
], ],
"sjd": [
"Cyrl",
[
"EU"
],
"Кӣллт са̄мь кӣлл"
],
"sje": [
"Latn",
[
"EU"
],
"bidumsámegiella"
],
"sjo": [ "sjo": [
"Mong", "Mong",
[ [
@@ -2996,6 +3115,13 @@ module.exports=( function ( $ ) {
], ],
"ᠰᡞᠪᡝ ᡤᡞᠰᡠᠨ" "ᠰᡞᠪᡝ ᡤᡞᠰᡠᠨ"
], ],
"sju": [
"Latn",
[
"EU"
],
"ubmejensámien giella"
],
"sk": [ "sk": [
"Latn", "Latn",
[ [
@@ -3509,6 +3635,13 @@ module.exports=( function ( $ ) {
], ],
"українська" "українська"
], ],
"umu": [
"Latn",
[
"AM"
],
"Huluníixsuwaakan"
],
"ur": [ "ur": [
"Arab", "Arab",
[ [
@@ -3801,6 +3934,13 @@ module.exports=( function ( $ ) {
"AF" "AF"
], ],
"isiZulu" "isiZulu"
],
"zun": [
"Latn",
[
"AM"
],
"Shiwi'ma"
] ]
}, },
"scriptgroups": { "scriptgroups": {
@@ -4096,6 +4236,7 @@ module.exports=( function ( $ ) {
"cr", "cr",
"yi", "yi",
"ike-cans", "ike-cans",
"moe",
"atj" "atj"
], ],
"CC": [ "CC": [
@@ -4396,6 +4537,7 @@ module.exports=( function ( $ ) {
], ],
"GF": [ "GF": [
"fr", "fr",
"gcr",
"zh-hant", "zh-hant",
"zh" "zh"
], ],
@@ -4447,7 +4589,8 @@ module.exports=( function ( $ ) {
"tsd" "tsd"
], ],
"GT": [ "GT": [
"es" "es",
"quc"
], ],
"GU": [ "GU": [
"en", "en",
@@ -5450,6 +5593,7 @@ module.exports=( function ( $ ) {
"ss", "ss",
"ve", "ve",
"hi", "hi",
"nr",
"sw" "sw"
], ],
"ZM": [ "ZM": [

View File

@@ -233,7 +233,11 @@
resultHandler: function ( query, results, autofillLabel ) { resultHandler: function ( query, results, autofillLabel ) {
if ( results.length === 0 ) { if ( results.length === 0 ) {
this.$suggestion.val( '' ); this.$suggestion.val( '' );
this.$element.trigger( 'noresults.uls', query ); this.$element.trigger(
'noresults.uls',
query,
this.options.ulsPurpose
);
return; return;
} }
@@ -338,6 +342,10 @@
lcd: undefined, lcd: undefined,
// URL to which we append query parameter with the query value // URL to which we append query parameter with the query value
searchAPI: undefined, searchAPI: undefined,
// What is this ULS used for.
// Should be set for distinguishing between different instances of ULS
// in the same application.
ulsPurpose: '',
// Object of language tags to language names // Object of language tags to language names
languages: [], languages: [],
// Callback function when language is selected // Callback function when language is selected