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-ME": "Малти хӗвел тухӑҫ",
"uls-region-PA": "Океани",
"uls-region-all": "Мӗн пур чӗлхе",
"uls-no-results-found": "Нимӗн те тупӑнмарӗ",
"uls-common-languages": "Чӗлхене сис",
"uls-common-languages": "Сӗннӗ чӗлхесем",
"uls-no-results-suggestion-title": "Тен çак чĕлхесем пăхма пултаратăр:",
"uls-search-help": "Чĕлхе ячĕпе, çырулăхĕпе, ISO-кочĕпе е регионĕпе шырама пулать:",
"uls-search-placeholder": "Чĕлхе шыра"

View File

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

View File

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

View File

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

View File

@@ -233,7 +233,11 @@
resultHandler: function ( query, results, autofillLabel ) {
if ( results.length === 0 ) {
this.$suggestion.val( '' );
this.$element.trigger( 'noresults.uls', query );
this.$element.trigger(
'noresults.uls',
query,
this.options.ulsPurpose
);
return;
}
@@ -338,6 +342,10 @@
lcd: undefined,
// URL to which we append query parameter with the query value
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
languages: [],
// Callback function when language is selected