Update jquery.uls and .ime from upstream

jquery.uls:
* Localisation updates.
* Change font-size unit from px to em
  See https://github.com/wikimedia/jquery.uls/pull/408
* Update language-data:
  See https://github.com/wikimedia/jquery.uls/pull/412
* Minor internal JS code cleanup for eslint.
Updating to
fe46a2f7ce

jquery.ime
* In API calls, accept langCodes that have no input methods
  See https://github.com/wikimedia/jquery.ime/pull/460
* Add a layout for the General Alphabet of Cameroon Languages
Updating to
ac21ea1b4a

Change-Id: I2be4ee30f649f6a906e776c37afa0ebdf2dc454f
This commit is contained in:
Amir E. Aharoni
2022-02-08 17:05:09 +02:00
parent 4a08065e8b
commit a682cd3f59
16 changed files with 217 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
/*! jquery.ime - v0.2.0+20220118 /*! jquery.ime - v0.2.0+20220208
* https://github.com/wikimedia/jquery.ime * https://github.com/wikimedia/jquery.ime
* Copyright (c) 2022 Santhosh Thottingal; License: (GPL-2.0-or-later OR MIT) */ * Copyright (c) 2022 Santhosh Thottingal; License: (GPL-2.0-or-later OR MIT) */
( function ( $ ) { ( function ( $ ) {
@@ -109,23 +109,25 @@
}, },
/** /**
* Return the autonym for an available language code * Return the autonym for a language code
* *
* @param {string} languageCode The language code * @param {string} languageCode The language code
* @return {string} The autonym * @return {string|undefined} The autonym, if known
*/ */
getAutonym: function ( languageCode ) { getAutonym: function ( languageCode ) {
return $.ime.languages[ languageCode ].autonym; var info = $.ime.languages[ languageCode ];
return info && info.autonym;
}, },
/** /**
* Return a list of available input method ids for a language * Return a list of available input method ids for a language
* *
* @param {string} languageCode An available language code * @param {string} languageCode A language code
* @return {string[]} Available input method ids for that language * @return {string[]} Available input method ids for that language
*/ */
getInputMethodIds: function ( languageCode ) { getInputMethodIds: function ( languageCode ) {
return $.ime.languages[ languageCode ].inputmethods; var info = $.ime.languages[ languageCode ];
return ( info && info.inputmethods ) || [];
}, },
/** /**
@@ -142,7 +144,7 @@
/** /**
* Return a list of input method info { id: ..., name: ... } for a language. * Return a list of input method info { id: ..., name: ... } for a language.
* *
* @param {string} languageCode An available language code * @param {string} languageCode A language code
* @return {Object[]} Info object for each available input method * @return {Object[]} Info object for each available input method
*/ */
getInputMethods: function ( languageCode ) { getInputMethods: function ( languageCode ) {
@@ -2194,6 +2196,10 @@
name: 'अक्षरांतरण', name: 'अक्षरांतरण',
source: 'rules/mr/mr-transliteration.js' source: 'rules/mr/mr-transliteration.js'
}, },
'mul-cm': {
name: 'General Alphabet of Cameroon Languages tilde keyboard',
source: 'rules/mul-cm/mul-cm.js'
},
'my-mm3': { 'my-mm3': {
name: 'မြန်မာ၃ လက်ကွက်', name: 'မြန်မာ၃ လက်ကွက်',
source: 'rules/my/my-mm3.js' source: 'rules/my/my-mm3.js'
@@ -2568,7 +2574,7 @@
}, },
bas: { bas: {
autonym: 'ɓasaá', autonym: 'ɓasaá',
inputmethods: [ 'bas-tilde' ] inputmethods: [ 'bas-tilde', 'mul-cm' ]
}, },
bbc: { bbc: {
autonym: 'Batak', autonym: 'Batak',
@@ -2600,7 +2606,7 @@
}, },
bkm: { bkm: {
autonym: 'Itaŋikom', autonym: 'Itaŋikom',
inputmethods: [ 'bkm-tilde' ] inputmethods: [ 'bkm-tilde', 'mul-cm' ]
}, },
bm: { bm: {
autonym: 'Bamanankan', autonym: 'Bamanankan',
@@ -2786,6 +2792,10 @@
autonym: 'Tyap', autonym: 'Tyap',
inputmethods: [ 'kcg-tilde' ] inputmethods: [ 'kcg-tilde' ]
}, },
ken: {
autonym: 'kɛ́nyáŋ',
inputmethods: [ 'mul-cm' ]
},
ki: { ki: {
autonym: 'Gĩkũyũ', autonym: 'Gĩkũyũ',
inputmethods: [ 'ki-tilde' ] inputmethods: [ 'ki-tilde' ]

View File

@@ -98,7 +98,7 @@
[ '\\.', 'ၜ' ], [ '\\.', 'ၜ' ],
[ '/', '။' ], [ '/', '။' ],
[ '\\?', '၊' ] [ '\\?', '၊' ]
], ]
}; };
$.ime.register( mnwAnonta ); $.ime.register( mnwAnonta );

View File

@@ -0,0 +1,65 @@
( function ( $ ) {
'use strict';
var mulCm = {
id: 'mul-cm',
name: 'mul-cm',
description: 'General Alphabet of Cameroon Languages tilde keyboard',
date: '2022-02-07',
URL: 'https://github.com/wikimedia/jquery.ime',
author: 'Amir E. Aharoni',
license: 'GPLv3',
version: '1.0',
maxKeyLength: 2,
patterns: [
[ '~A', 'Ɑ' ],
[ '~a', 'ɑ' ],
[ 'AE', 'Æ' ],
[ 'Ae', 'Æ' ],
[ 'ae', 'æ' ],
[ 'A~E', 'AE' ],
[ 'A~e', 'Ae' ],
[ 'a~e', 'ae' ],
[ 'OE', 'Œ' ],
[ 'Oe', 'Œ' ],
[ 'oe', 'œ' ],
[ 'O~E', 'OE' ],
[ 'O~e', 'Oe' ],
[ 'o~e', 'oe' ],
[ '~B', 'Ɓ' ],
[ '~b', 'ɓ' ],
[ '~c', 'ə' ],
[ '~C', 'Ə' ],
[ '~E', 'Ɛ' ],
[ '~e', 'ɛ' ],
[ '~D', 'Ɗ' ],
[ '~d', 'ɗ' ],
[ '~I', 'Ɨ' ],
[ '~i', 'ɨ' ],
[ '~N', 'Ŋ' ],
[ '~n', 'ŋ' ],
[ '~J', 'Ø' ],
[ '~j', 'ø' ],
[ '~O', 'Ɔ' ],
[ '~o', 'ɔ' ],
[ '~U', 'Ʉ' ],
[ '~u', 'ʉ' ],
[ '~X', 'ɤ' ], // There's no uppercase ɤ ("ram's horns") in Unicode
[ '~x', 'ɤ' ],
[ '~W', 'Ẅ' ],
[ '~w', 'ẅ' ],
[ '~Y', 'Ƴ' ],
[ '~y', 'ƴ' ],
[ '~\\\\', '\u0300' ], // Combining grave accent
[ '~/', '\u0301' ], // Combining acute accent
[ '~\\^', '\u0302' ], // Combining circumflex accent
[ '~-', '\u0304' ], // Combining macron
[ '~v', '\u030C' ], // Combining caron
[ '~\\|', '\u030D' ], // Combining vertical line above
[ '~\\.', '\u0323' ], // Combining dot below
[ '~,', '\u0327' ] // Combining cedilla
]
};
$.ime.register( mulCm );
}( jQuery ) );

View File

@@ -97,7 +97,7 @@
[ 'M', '\u1026' ], // ဦ UU [ 'M', '\u1026' ], // ဦ UU
[ '\\<', '\u104A' ], // ၊ SIGN LITTLE SECTION [ '\\<', '\u104A' ], // ၊ SIGN LITTLE SECTION
[ '\\>', '\u104B' ], // ။ SIGN SECTION [ '\\>', '\u104B' ] // ။ SIGN SECTION
] ]
}; };

View File

@@ -76,7 +76,7 @@
/* There are two input boxes. This class applies to both of them */ /* There are two input boxes. This class applies to both of them */
.uls-filterinput { .uls-filterinput {
font-size: 16px; font-size: 1.143em;
height: 32px; height: 32px;
width: 100%; width: 100%;
/* For the custom clear (X) icon */ /* For the custom clear (X) icon */

View File

@@ -19,7 +19,7 @@
.uls-lcd-region-title { .uls-lcd-region-title {
color: #555; color: #555;
font-size: 14px; font-size: 1em;
padding-left: 28px; padding-left: 28px;
} }
@@ -91,7 +91,7 @@
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;
color: #36c; color: #36c;
font-size: 14px; font-size: 1em;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;
@@ -119,7 +119,7 @@
} }
.uls-no-results-found-title { .uls-no-results-found-title {
font-size: 16px; font-size: 1.143em;
padding: 0 16px 0 28px; padding: 0 16px 0 28px;
margin: 20px 0; margin: 20px 0;
border-bottom: 0; border-bottom: 0;
@@ -133,7 +133,7 @@
font-size: 0.9em; font-size: 0.9em;
width: 100%; width: 100%;
margin-top: 1.6em; margin-top: 1.6em;
line-height: 1.6em; line-height: 1.6;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;

View File

@@ -18,7 +18,7 @@
} }
.uls-mobile .uls-language-block a { .uls-mobile .uls-language-block a {
font-size: 16px; font-size: 1.143em;
line-height: 1.7em; line-height: 1.7em;
} }

View File

@@ -14,5 +14,8 @@
"uls-region-PA": "Pasifiko", "uls-region-PA": "Pasifiko",
"uls-region-all": "Kom zungun", "uls-region-all": "Kom zungun",
"uls-no-results-found": "Pengelay tami kintun", "uls-no-results-found": "Pengelay tami kintun",
"uls-common-languages": "Pünefal zungun",
"uls-no-results-suggestion-title": "Pepi zuamkeafuymi:",
"uls-search-help": "Pepi kintuaymi zungun ñi uy, wirin ñi azkülen, ISO zungu, kam chew ñi mülemum",
"uls-search-placeholder": "Kintun kiñe zungun" "uls-search-placeholder": "Kintun kiñe zungun"
} }

View File

@@ -0,0 +1,22 @@
{
"@metadata": {
"authors": [
"Joshateji",
"Samatics"
]
},
"uls-region-WW": "Lẹdo aihọn pé",
"uls-region-SP": "Vonọtaun",
"uls-region-AM": "Amẹlika",
"uls-region-AF": "Aflika",
"uls-region-EU": "Europe",
"uls-region-AS": "Asia",
"uls-region-ME": "Middle East",
"uls-region-PA": "Pasifik",
"uls-region-all": "Ogbè lẹpo",
"uls-no-results-found": "Nuhe dín a te ma sọawuhia to owé depope mẹ",
"uls-common-languages": "Ogbè he yin nudego lẹ",
"uls-no-results-suggestion-title": "Mì sọgan tindo ojlo na ehelẹ:",
"uls-search-help": "Mì sọgan yí yinkọ ogbè tọn do dín, kavi yinkọ wekinkan tọn, kavi hokun ISO ogbè tọn kavi mì ni dín gbọn lẹdo lọ yiyizan dali.",
"uls-search-placeholder": "Dín ogbè de"
}

View File

@@ -0,0 +1,21 @@
{
"@metadata": {
"authors": [
"Gilbert Ndihokubwayo"
]
},
"uls-region-WW": "Kw'isi yose",
"uls-region-SP": "Bidasanzwe",
"uls-region-AM": "Amerika",
"uls-region-AF": "Afrika",
"uls-region-EU": "Uburayi",
"uls-region-AS": "Aziya",
"uls-region-ME": "Uburasirazuba bwo hagati",
"uls-region-PA": "Pasifike",
"uls-region-all": "Indimi zose",
"uls-no-results-found": "Nta nyishu yabonetse",
"uls-common-languages": "Indimi zihitishijwemwo",
"uls-no-results-suggestion-title": "Ushobora gushimishwa na:",
"uls-search-help": "Ushobora kurondeza ukoresheje izina ryururimi, izina ry'ivyandiko, kode ISO y'ururimi canke naho ukarondeza ukoresheje akarere.",
"uls-search-placeholder": "Rondeza ururimi"
}

View File

@@ -18,5 +18,5 @@
"uls-common-languages": "Lingui cchiù scigghiuti", "uls-common-languages": "Lingui cchiù scigghiuti",
"uls-no-results-suggestion-title": "Poi èssiri ntirissatu a:", "uls-no-results-suggestion-title": "Poi èssiri ntirissatu a:",
"uls-search-help": "È pussìbbili arricircari pi nomu, nomu dô script, còdice ISO dâ lingua o si pò navigari tràmiti riggiuni.", "uls-search-help": "È pussìbbili arricircari pi nomu, nomu dô script, còdice ISO dâ lingua o si pò navigari tràmiti riggiuni.",
"uls-search-placeholder": "Arricerca lingua" "uls-search-placeholder": "Arricerca na lingua"
} }

View File

@@ -1,21 +1,22 @@
{ {
"@metadata": { "@metadata": {
"authors": [ "authors": [
"Castillerian",
"פוילישער" "פוילישער"
] ]
}, },
"uls-region-WW": "וועלטווייט", "uls-region-WW": "גלאָבאַל",
"uls-region-SP": "באזונדער", "uls-region-SP": "באַזונדער",
"uls-region-AM": "אמעריקע", "uls-region-AM": ַמעריקע",
"uls-region-AF": "אפֿריקע", "uls-region-AF": ַפֿריקע",
"uls-region-EU": "אייראפע", "uls-region-EU": "אייראָפּע",
"uls-region-AS": "אזיע", "uls-region-AS": ַזיע",
"uls-region-ME": "מיטל מזרח", "uls-region-ME": "מיטל מזרח",
"uls-region-PA": אציפֿיק", "uls-region-PA": ּאַציפֿיק",
"uls-region-all": "אלע שפראַכן", "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

@@ -23,7 +23,6 @@
var template, ULS; var template, ULS;
// Region numbers in id attributes also appear in the langdb. // Region numbers in id attributes also appear in the langdb.
// eslint-disable-next-line no-multi-str
template = '<div class="grid uls-menu"> \ template = '<div class="grid uls-menu"> \
<div id="search" class="row uls-search"> \ <div id="search" class="row uls-search"> \
<div class="uls-search-wrapper"> \ <div class="uls-search-wrapper"> \

View File

@@ -1313,6 +1313,13 @@
], ],
"furlan" "furlan"
], ],
"fvr": [
"Latn",
[
"AF"
],
"pooríŋ beléŋ"
],
"fy": [ "fy": [
"Latn", "Latn",
[ [
@@ -2594,6 +2601,13 @@
], ],
"innu-aimun" "innu-aimun"
], ],
"mos": [
"Latn",
[
"AF"
],
"moore"
],
"mr": [ "mr": [
"Deva", "Deva",
[ [
@@ -3530,6 +3544,27 @@
], ],
"davvisámegiella" "davvisámegiella"
], ],
"se-fi": [
"Latn",
[
"EU"
],
"davvisámegiella (Suoma bealde)"
],
"se-no": [
"Latn",
[
"EU"
],
"davvisámegiella (Norgga bealde)"
],
"se-se": [
"Latn",
[
"EU"
],
"davvisámegiella (Ruoŧa bealde)"
],
"ses": [ "ses": [
"Latn", "Latn",
[ [
@@ -3596,6 +3631,9 @@
], ],
"tacawit" "tacawit"
], ],
"shy": [
"shy-latn"
],
"si": [ "si": [
"Sinh", "Sinh",
[ [
@@ -4018,12 +4056,15 @@
], ],
"lea faka-Tonga" "lea faka-Tonga"
], ],
"tokipona": [ "tok": [
"Latn", "Latn",
[ [
"WW" "WW"
], ],
"Toki Pona" "toki pona"
],
"tokipona": [
"tok"
], ],
"tpi": [ "tpi": [
"Latn", "Latn",
@@ -4060,7 +4101,7 @@
[ [
"AS" "AS"
], ],
"Sediq Taroko" "Seediq"
], ],
"ts": [ "ts": [
"Latn", "Latn",
@@ -4209,6 +4250,16 @@
], ],
"oʻzbekcha" "oʻzbekcha"
], ],
"uz-cyrl": [
"Cyrl",
[
"AS"
],
"ўзбекча"
],
"uz-latn": [
"uz"
],
"ve": [ "ve": [
"Latn", "Latn",
[ [
@@ -4738,6 +4789,7 @@
"wa" "wa"
], ],
"BF": [ "BF": [
"mos",
"fr", "fr",
"ff" "ff"
], ],
@@ -4907,6 +4959,7 @@
"en", "en",
"ru", "ru",
"vi", "vi",
"uz-cyrl",
"uz", "uz",
"lzh" "lzh"
], ],
@@ -5606,7 +5659,8 @@
"ta" "ta"
], ],
"MV": [ "MV": [
"dv" "dv",
"en"
], ],
"MW": [ "MW": [
"en", "en",
@@ -5905,6 +5959,7 @@
"SD": [ "SD": [
"ar", "ar",
"en", "en",
"fvr",
"ha-arab", "ha-arab",
"ha" "ha"
], ],
@@ -6154,6 +6209,7 @@
], ],
"UZ": [ "UZ": [
"uz", "uz",
"uz-cyrl",
"ru", "ru",
"kaa", "kaa",
"tr" "tr"

View File

@@ -19,6 +19,8 @@
/** /**
* Usage: $( 'inputbox' ).languagefilter(); * Usage: $( 'inputbox' ).languagefilter();
* The values for autocompletion is from the options.languages or options.searchAPI. * The values for autocompletion is from the options.languages or options.searchAPI.
*
* @param {jQuery} $
*/ */
( function ( $ ) { ( function ( $ ) {
'use strict'; 'use strict';
@@ -270,12 +272,12 @@
userInput = this.$element.val(); userInput = this.$element.val();
suggestion = userInput + suggestion = userInput +
languageName.substring( userInput.length, languageName.length ); languageName.slice( userInput.length, languageName.length );
if ( suggestion.toLowerCase() !== languageName.toLowerCase() ) { if ( suggestion.toLowerCase() !== languageName.toLowerCase() ) {
// see if it was autonym match // see if it was autonym match
autonym = $.uls.data.getAutonym( langCode ) || ''; autonym = $.uls.data.getAutonym( langCode ) || '';
suggestion = userInput + autonym.substring( userInput.length, autonym.length ); suggestion = userInput + autonym.slice( userInput.length, autonym.length );
if ( suggestion !== autonym ) { if ( suggestion !== autonym ) {
// Give up. It may be an ISO/script code match. // Give up. It may be an ISO/script code match.

View File

@@ -21,7 +21,6 @@
( function ( $ ) { ( function ( $ ) {
'use strict'; 'use strict';
// eslint-disable-next-line no-multi-str
var noResultsTemplate = '<div class="uls-no-results-view"> \ var noResultsTemplate = '<div class="uls-no-results-view"> \
<h2 data-i18n="uls-no-results-found" class="uls-no-results-found-title">No results found</h2> \ <h2 data-i18n="uls-no-results-found" class="uls-no-results-found-title">No results found</h2> \
<div class="uls-no-results-suggestions"></div> \ <div class="uls-no-results-suggestions"></div> \