1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:27:34 +00:00

LibLocale+LibJS: Update to CLDR version 42.0.0

There were some notable changes to the CLDR JSON format and data in this
release.

The patterns for a date at a specific time, i.e. "{date} at {time}", now
appear under the "atTime" attribute of the "dateTimeFormats" object.

Locale specific changes that affected test-js:

All locales:

* In many patterns, the code points U+00A0 (NO-BREAK SPACE) and U+202F
  (NARROW NO-BREAK SPACE) are now used in place of an ASCII space. For
  example, before the "dayPeriod" fields AM and PM.

* Separators such as U+2013 (EN DASH) are now surrounded by U+2009 (THIN
  SPACE) in place of an ASCII space character.

Locale "en":

* Narrow localizations of time formats are even more narrow. For
  example, the abbreviation "wk." for "week" is now just "wk".

Locale "ar":

* The code point U+060C (ARABIC COMMA) is now used in place of an ASCII
  comma.

* The code point U+200F (RIGHT-TO-LEFT MARK) now appears at the
  beginning of many localizations.

* When the "latn" numbering system is used for currency formatting, the
  currency symbol more consistently is placed at the end of the pattern.

Locale "he":

* The "many" plural rules category has been removed.

Locales "zh" and "es-419":

* Several display-name localizations were changed.
This commit is contained in:
Timothy Flynn 2022-10-19 15:34:17 -04:00 committed by Linus Groh
parent b87398341b
commit b077fccd3d
14 changed files with 277 additions and 225 deletions

View file

@ -1153,9 +1153,9 @@ describe("style=currency", () => {
currency: "USD",
currencyDisplay: "code",
});
expect(ar1.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0USD");
expect(ar1.format(1.2)).toBe("\u0661\u066b\u0662\u0660\u00a0USD");
expect(ar1.format(1.23)).toBe("\u0661\u066b\u0662\u0663\u00a0USD");
expect(ar1.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0USD");
expect(ar1.format(1.2)).toBe("\u200f\u0661\u066b\u0662\u0660\u00a0USD");
expect(ar1.format(1.23)).toBe("\u200f\u0661\u066b\u0662\u0663\u00a0USD");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1163,9 +1163,9 @@ describe("style=currency", () => {
currencyDisplay: "code",
numberingSystem: "latn",
});
expect(ar2.format(1)).toBe("USD\u00a01.00");
expect(ar2.format(1.2)).toBe("USD\u00a01.20");
expect(ar2.format(1.23)).toBe("USD\u00a01.23");
expect(ar2.format(1)).toBe("\u200f1.00\u00a0USD");
expect(ar2.format(1.2)).toBe("\u200f1.20\u00a0USD");
expect(ar2.format(1.23)).toBe("\u200f1.23\u00a0USD");
});
test("currencyDisplay=symbol", () => {
@ -1192,9 +1192,9 @@ describe("style=currency", () => {
currency: "USD",
currencyDisplay: "symbol",
});
expect(ar1.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1.2)).toBe("\u0661\u066b\u0662\u0660\u00a0US$");
expect(ar1.format(1.23)).toBe("\u0661\u066b\u0662\u0663\u00a0US$");
expect(ar1.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1.2)).toBe("\u200f\u0661\u066b\u0662\u0660\u00a0US$");
expect(ar1.format(1.23)).toBe("\u200f\u0661\u066b\u0662\u0663\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1202,9 +1202,9 @@ describe("style=currency", () => {
currencyDisplay: "symbol",
numberingSystem: "latn",
});
expect(ar2.format(1)).toBe("US$\u00a01.00");
expect(ar2.format(1.2)).toBe("US$\u00a01.20");
expect(ar2.format(1.23)).toBe("US$\u00a01.23");
expect(ar2.format(1)).toBe("\u200f1.00\u00a0US$");
expect(ar2.format(1.2)).toBe("\u200f1.20\u00a0US$");
expect(ar2.format(1.23)).toBe("\u200f1.23\u00a0US$");
});
test("currencyDisplay=narrowSymbol", () => {
@ -1231,9 +1231,9 @@ describe("style=currency", () => {
currency: "USD",
currencyDisplay: "narrowSymbol",
});
expect(ar1.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1.2)).toBe("\u0661\u066b\u0662\u0660\u00a0US$");
expect(ar1.format(1.23)).toBe("\u0661\u066b\u0662\u0663\u00a0US$");
expect(ar1.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1.2)).toBe("\u200f\u0661\u066b\u0662\u0660\u00a0US$");
expect(ar1.format(1.23)).toBe("\u200f\u0661\u066b\u0662\u0663\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1241,9 +1241,9 @@ describe("style=currency", () => {
currencyDisplay: "narrowSymbol",
numberingSystem: "latn",
});
expect(ar2.format(1)).toBe("US$\u00a01.00");
expect(ar2.format(1.2)).toBe("US$\u00a01.20");
expect(ar2.format(1.23)).toBe("US$\u00a01.23");
expect(ar2.format(1)).toBe("\u200f1.00\u00a0US$");
expect(ar2.format(1.2)).toBe("\u200f1.20\u00a0US$");
expect(ar2.format(1.23)).toBe("\u200f1.23\u00a0US$");
});
test("currencyDisplay=name", () => {
@ -1308,8 +1308,8 @@ describe("style=currency", () => {
currency: "USD",
signDisplay: "never",
});
expect(ar1.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1317,8 +1317,8 @@ describe("style=currency", () => {
currencySign: "accounting",
signDisplay: "never",
});
expect(ar2.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
});
test("signDisplay=auto", () => {
@ -1348,10 +1348,10 @@ describe("style=currency", () => {
currency: "USD",
signDisplay: "auto",
});
expect(ar1.format(0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u061c-\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u061c-\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1359,10 +1359,10 @@ describe("style=currency", () => {
currencySign: "accounting",
signDisplay: "auto",
});
expect(ar2.format(0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u061c-\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u061c-\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
});
test("signDisplay=always", () => {
@ -1392,10 +1392,10 @@ describe("style=currency", () => {
currency: "USD",
signDisplay: "always",
});
expect(ar1.format(0)).toBe("\u061c+\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u061c+\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u061c-\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(0)).toBe("\u061c+\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u061c+\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u061c-\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1403,10 +1403,10 @@ describe("style=currency", () => {
currencySign: "accounting",
signDisplay: "always",
});
expect(ar2.format(0)).toBe("\u061c+\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u061c+\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u061c-\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(0)).toBe("\u061c+\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u061c+\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u061c-\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
});
test("signDisplay=exceptZero", () => {
@ -1436,10 +1436,10 @@ describe("style=currency", () => {
currency: "USD",
signDisplay: "exceptZero",
});
expect(ar1.format(0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u061c+\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u061c+\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1447,10 +1447,10 @@ describe("style=currency", () => {
currencySign: "accounting",
signDisplay: "exceptZero",
});
expect(ar2.format(0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u061c+\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u061c+\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
});
test("signDisplay=negative", () => {
@ -1480,10 +1480,10 @@ describe("style=currency", () => {
currency: "USD",
signDisplay: "negative",
});
expect(ar1.format(0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar1.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
const ar2 = new Intl.NumberFormat("ar", {
style: "currency",
@ -1491,10 +1491,10 @@ describe("style=currency", () => {
currencySign: "accounting",
signDisplay: "negative",
});
expect(ar2.format(0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(1)).toBe("\u200f\u0661\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-0)).toBe("\u200f\u0660\u066b\u0660\u0660\u00a0US$");
expect(ar2.format(-1)).toBe("\u061c-\u200f\u0661\u066b\u0660\u0660\u00a0US$");
});
});

View file

@ -678,6 +678,7 @@ describe("style=currency", () => {
currencyDisplay: "code",
});
expect(ar.formatToParts(1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -685,6 +686,7 @@ describe("style=currency", () => {
{ type: "currency", value: "USD" },
]);
expect(ar.formatToParts(1.23)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0662\u0663" },
@ -718,6 +720,7 @@ describe("style=currency", () => {
currencyDisplay: "symbol",
});
expect(ar.formatToParts(1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -725,6 +728,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(1.23)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0662\u0663" },
@ -758,6 +762,7 @@ describe("style=currency", () => {
currencyDisplay: "narrowSymbol",
});
expect(ar.formatToParts(1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -765,6 +770,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(1.23)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0662\u0663" },
@ -840,6 +846,7 @@ describe("style=currency", () => {
signDisplay: "never",
});
expect(ar.formatToParts(1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -847,6 +854,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(-1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -913,6 +921,7 @@ describe("style=currency", () => {
signDisplay: "auto",
});
expect(ar.formatToParts(0)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -920,6 +929,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -928,6 +938,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(-0)).toEqual([
{ type: "minusSign", value: "\u061c-" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -936,6 +947,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(-1)).toEqual([
{ type: "minusSign", value: "\u061c-" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1021,6 +1033,7 @@ describe("style=currency", () => {
});
expect(ar.formatToParts(0)).toEqual([
{ type: "plusSign", value: "\u061c+" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1029,6 +1042,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(1)).toEqual([
{ type: "plusSign", value: "\u061c+" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1037,6 +1051,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(-0)).toEqual([
{ type: "minusSign", value: "\u061c-" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1045,6 +1060,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(-1)).toEqual([
{ type: "minusSign", value: "\u061c-" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1129,6 +1145,7 @@ describe("style=currency", () => {
signDisplay: "exceptZero",
});
expect(ar.formatToParts(0)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1137,6 +1154,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(1)).toEqual([
{ type: "plusSign", value: "\u061c+" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1144,6 +1162,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(-0)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1152,6 +1171,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(-1)).toEqual([
{ type: "minusSign", value: "\u061c-" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1232,6 +1252,7 @@ describe("style=currency", () => {
signDisplay: "negative",
});
expect(ar.formatToParts(0)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1239,6 +1260,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(1)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1246,6 +1268,7 @@ describe("style=currency", () => {
{ type: "currency", value: "US$" },
]);
expect(ar.formatToParts(-0)).toEqual([
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0660" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },
@ -1254,6 +1277,7 @@ describe("style=currency", () => {
]);
expect(ar.formatToParts(-1)).toEqual([
{ type: "minusSign", value: "\u061c-" },
{ type: "literal", value: "\u200f" },
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0660\u0660" },