@formatjs/intl-getcanonicallocales 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/index.js +2 -2
- package/package.json +2 -2
- package/polyfill.iife.js +994 -799
- package/should-polyfill.js +1 -2
- package/src/aliases.generated.js +10 -0
- package/src/canonicalizer.js +2 -3
- package/src/emitter.js +2 -3
- package/src/likelySubtags.generated.js +862 -686
- package/src/parser.js +8 -8
package/should-polyfill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldPolyfill =
|
|
3
|
+
exports.shouldPolyfill = shouldPolyfill;
|
|
4
4
|
function shouldPolyfill() {
|
|
5
5
|
return (typeof Intl === 'undefined' ||
|
|
6
6
|
!('getCanonicalLocales' in Intl) ||
|
|
@@ -9,4 +9,3 @@ function shouldPolyfill() {
|
|
|
9
9
|
Intl.getCanonicalLocales('und-x-private')[0] ===
|
|
10
10
|
'x-private');
|
|
11
11
|
}
|
|
12
|
-
exports.shouldPolyfill = shouldPolyfill;
|
package/src/aliases.generated.js
CHANGED
|
@@ -12,6 +12,7 @@ exports.languageAlias = {
|
|
|
12
12
|
"afr": "af",
|
|
13
13
|
"agp": "apf",
|
|
14
14
|
"ais": "ami",
|
|
15
|
+
"ajp": "apc",
|
|
15
16
|
"ajt": "aeb",
|
|
16
17
|
"aju": "jrb",
|
|
17
18
|
"aka": "ak",
|
|
@@ -209,6 +210,7 @@ exports.languageAlias = {
|
|
|
209
210
|
"kgc": "tdf",
|
|
210
211
|
"kgd": "ncq",
|
|
211
212
|
"kgh": "kml",
|
|
213
|
+
"kgm": "plu",
|
|
212
214
|
"khk": "mn",
|
|
213
215
|
"khm": "km",
|
|
214
216
|
"kik": "ki",
|
|
@@ -299,6 +301,7 @@ exports.languageAlias = {
|
|
|
299
301
|
"no-nyn": "nn",
|
|
300
302
|
"no-nynorsk": "nn",
|
|
301
303
|
"nob": "nb",
|
|
304
|
+
"nom": "cbr",
|
|
302
305
|
"noo": "dtd",
|
|
303
306
|
"nor": "no",
|
|
304
307
|
"npi": "ne",
|
|
@@ -322,12 +325,14 @@ exports.languageAlias = {
|
|
|
322
325
|
"pli": "pi",
|
|
323
326
|
"plt": "mg",
|
|
324
327
|
"pmc": "huw",
|
|
328
|
+
"pmk": "crr",
|
|
325
329
|
"pmu": "phr",
|
|
326
330
|
"pnb": "lah",
|
|
327
331
|
"pol": "pl",
|
|
328
332
|
"por": "pt",
|
|
329
333
|
"ppa": "bfy",
|
|
330
334
|
"ppr": "lcq",
|
|
335
|
+
"prp": "gu",
|
|
331
336
|
"prs": "fa-AF",
|
|
332
337
|
"pry": "prt",
|
|
333
338
|
"pus": "ps",
|
|
@@ -398,6 +403,7 @@ exports.languageAlias = {
|
|
|
398
403
|
"swc": "sw-CD",
|
|
399
404
|
"swe": "sv",
|
|
400
405
|
"swh": "sw",
|
|
406
|
+
"szd": "umi",
|
|
401
407
|
"tah": "ty",
|
|
402
408
|
"tam": "ta",
|
|
403
409
|
"tat": "tt",
|
|
@@ -417,10 +423,12 @@ exports.languageAlias = {
|
|
|
417
423
|
"tkk": "twm",
|
|
418
424
|
"tl": "fil",
|
|
419
425
|
"tlw": "weo",
|
|
426
|
+
"tmk": "tdg",
|
|
420
427
|
"tmp": "tyj",
|
|
421
428
|
"tne": "kak",
|
|
422
429
|
"tnf": "fa-AF",
|
|
423
430
|
"ton": "to",
|
|
431
|
+
"tpw": "tpn",
|
|
424
432
|
"tsf": "taj",
|
|
425
433
|
"tsn": "tn",
|
|
426
434
|
"tso": "ts",
|
|
@@ -464,6 +472,7 @@ exports.languageAlias = {
|
|
|
464
472
|
"xrq": "dmw",
|
|
465
473
|
"xsj": "suj",
|
|
466
474
|
"xsl": "den",
|
|
475
|
+
"xss": "zko",
|
|
467
476
|
"ybd": "rki",
|
|
468
477
|
"ydd": "yi",
|
|
469
478
|
"yen": "ynq",
|
|
@@ -489,6 +498,7 @@ exports.languageAlias = {
|
|
|
489
498
|
"zha": "za",
|
|
490
499
|
"zho": "zh",
|
|
491
500
|
"zir": "scv",
|
|
501
|
+
"zkb": "kjh",
|
|
492
502
|
"zsm": "ms",
|
|
493
503
|
"zul": "zu",
|
|
494
504
|
"zyb": "za"
|
package/src/canonicalizer.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.canonicalizeUnicodeLanguageId = canonicalizeUnicodeLanguageId;
|
|
4
|
+
exports.canonicalizeUnicodeLocaleId = canonicalizeUnicodeLocaleId;
|
|
4
5
|
var tslib_1 = require("tslib");
|
|
5
6
|
var aliases_generated_1 = require("./aliases.generated");
|
|
6
7
|
var parser_1 = require("./parser");
|
|
@@ -186,7 +187,6 @@ function canonicalizeUnicodeLanguageId(unicodeLanguageId) {
|
|
|
186
187
|
}
|
|
187
188
|
return finalLangAst;
|
|
188
189
|
}
|
|
189
|
-
exports.canonicalizeUnicodeLanguageId = canonicalizeUnicodeLanguageId;
|
|
190
190
|
/**
|
|
191
191
|
* Canonicalize based on
|
|
192
192
|
* https://www.unicode.org/reports/tr35/tr35.html#Canonical_Unicode_Locale_Identifiers
|
|
@@ -221,4 +221,3 @@ function canonicalizeUnicodeLocaleId(locale) {
|
|
|
221
221
|
}
|
|
222
222
|
return locale;
|
|
223
223
|
}
|
|
224
|
-
exports.canonicalizeUnicodeLocaleId = canonicalizeUnicodeLocaleId;
|
package/src/emitter.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.emitUnicodeLanguageId = emitUnicodeLanguageId;
|
|
4
|
+
exports.emitUnicodeLocaleId = emitUnicodeLocaleId;
|
|
4
5
|
var tslib_1 = require("tslib");
|
|
5
6
|
function emitUnicodeLanguageId(lang) {
|
|
6
7
|
if (!lang) {
|
|
@@ -9,7 +10,6 @@ function emitUnicodeLanguageId(lang) {
|
|
|
9
10
|
return tslib_1.__spreadArray([lang.lang, lang.script, lang.region], (lang.variants || []), true).filter(Boolean)
|
|
10
11
|
.join('-');
|
|
11
12
|
}
|
|
12
|
-
exports.emitUnicodeLanguageId = emitUnicodeLanguageId;
|
|
13
13
|
function emitUnicodeLocaleId(_a) {
|
|
14
14
|
var lang = _a.lang, extensions = _a.extensions;
|
|
15
15
|
var chunks = [emitUnicodeLanguageId(lang)];
|
|
@@ -30,4 +30,3 @@ function emitUnicodeLocaleId(_a) {
|
|
|
30
30
|
}
|
|
31
31
|
return chunks.filter(Boolean).join('-');
|
|
32
32
|
}
|
|
33
|
-
exports.emitUnicodeLocaleId = emitUnicodeLocaleId;
|