1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

LibLocale: Update to CLDR version 44.0.1

https://cldr.unicode.org/index/downloads/cldr-44

Notable changes that affect us include:

* The Islamic Calendar is now localized as the Hijri Calender (in en-US)
  but has not been updated for all locales. So this patch updates tests
  where possible and removes a few test cases that currently cannot be
  localized.

* The und locale has received more likely subtag data (the und locale is
  basically a pseudo-locale meaning "undetermined").

* The exponential symbol in the Arabic number system was changed from
  U+0627 to U+0623.
This commit is contained in:
Timothy Flynn 2023-11-01 09:45:50 -04:00 committed by Tim Flynn
parent 536b9c29e4
commit 38dd284915
6 changed files with 30 additions and 32 deletions

View file

@ -176,14 +176,14 @@ describe("style=decimal", () => {
expect(en.format(0.01)).toBe("1E-2");
const ar = new Intl.NumberFormat("ar", { notation: "scientific" });
expect(ar.format(1)).toBe("\u0661\u0627\u0633\u0660");
expect(ar.format(1.2)).toBe("\u0661\u066b\u0662\u0627\u0633\u0660");
expect(ar.format(12)).toBe("\u0661\u066b\u0662\u0627\u0633\u0661");
expect(ar.format(12.3)).toBe("\u0661\u066b\u0662\u0663\u0627\u0633\u0661");
expect(ar.format(123)).toBe("\u0661\u066b\u0662\u0663\u0627\u0633\u0662");
expect(ar.format(0.1)).toBe("\u0661\u0627\u0633\u061c-\u0661");
expect(ar.format(0.12)).toBe("\u0661\u066b\u0662\u0627\u0633\u061c-\u0661");
expect(ar.format(0.01)).toBe("\u0661\u0627\u0633\u061c-\u0662");
expect(ar.format(1)).toBe("\u0661\u0623\u0633\u0660");
expect(ar.format(1.2)).toBe("\u0661\u066b\u0662\u0623\u0633\u0660");
expect(ar.format(12)).toBe("\u0661\u066b\u0662\u0623\u0633\u0661");
expect(ar.format(12.3)).toBe("\u0661\u066b\u0662\u0663\u0623\u0633\u0661");
expect(ar.format(123)).toBe("\u0661\u066b\u0662\u0663\u0623\u0633\u0662");
expect(ar.format(0.1)).toBe("\u0661\u0623\u0633\u061c-\u0661");
expect(ar.format(0.12)).toBe("\u0661\u066b\u0662\u0623\u0633\u061c-\u0661");
expect(ar.format(0.01)).toBe("\u0661\u0623\u0633\u061c-\u0662");
});
test("notation=engineering", () => {
@ -201,19 +201,19 @@ describe("style=decimal", () => {
expect(en.format(1.23)).toBe("1.23E0");
const ar = new Intl.NumberFormat("ar", { notation: "engineering" });
expect(ar.format(1)).toBe("\u0661\u0627\u0633\u0660");
expect(ar.format(1.2)).toBe("\u0661\u066b\u0662\u0627\u0633\u0660");
expect(ar.format(12)).toBe("\u0661\u0662\u0627\u0633\u0660");
expect(ar.format(123)).toBe("\u0661\u0662\u0663\u0627\u0633\u0660");
expect(ar.format(1234)).toBe("\u0661\u066b\u0662\u0663\u0664\u0627\u0633\u0663");
expect(ar.format(12345)).toBe("\u0661\u0662\u066b\u0663\u0664\u0665\u0627\u0633\u0663");
expect(ar.format(1)).toBe("\u0661\u0623\u0633\u0660");
expect(ar.format(1.2)).toBe("\u0661\u066b\u0662\u0623\u0633\u0660");
expect(ar.format(12)).toBe("\u0661\u0662\u0623\u0633\u0660");
expect(ar.format(123)).toBe("\u0661\u0662\u0663\u0623\u0633\u0660");
expect(ar.format(1234)).toBe("\u0661\u066b\u0662\u0663\u0664\u0623\u0633\u0663");
expect(ar.format(12345)).toBe("\u0661\u0662\u066b\u0663\u0664\u0665\u0623\u0633\u0663");
expect(ar.format(123456)).toBe(
"\u0661\u0662\u0663\u066b\u0664\u0665\u0666\u0627\u0633\u0663"
"\u0661\u0662\u0663\u066b\u0664\u0665\u0666\u0623\u0633\u0663"
);
expect(ar.format(1234567)).toBe("\u0661\u066b\u0662\u0663\u0665\u0627\u0633\u0666");
expect(ar.format(0.1)).toBe("\u0661\u0660\u0660\u0627\u0633\u061c-\u0663");
expect(ar.format(0.12)).toBe("\u0661\u0662\u0660\u0627\u0633\u061c-\u0663");
expect(ar.format(1.23)).toBe("\u0661\u066b\u0662\u0663\u0627\u0633\u0660");
expect(ar.format(1234567)).toBe("\u0661\u066b\u0662\u0663\u0665\u0623\u0633\u0666");
expect(ar.format(0.1)).toBe("\u0661\u0660\u0660\u0623\u0633\u061c-\u0663");
expect(ar.format(0.12)).toBe("\u0661\u0662\u0660\u0623\u0633\u061c-\u0663");
expect(ar.format(1.23)).toBe("\u0661\u066b\u0662\u0663\u0623\u0633\u0660");
});
test("notation=compact", () => {

View file

@ -322,14 +322,14 @@ describe("style=decimal", () => {
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0662\u0663" },
{ type: "exponentSeparator", value: "\u0627\u0633" },
{ type: "exponentSeparator", value: "\u0623\u0633" },
{ type: "exponentInteger", value: "\u0661" },
]);
expect(ar.formatToParts(0.12)).toEqual([
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0662" },
{ type: "exponentSeparator", value: "\u0627\u0633" },
{ type: "exponentSeparator", value: "\u0623\u0633" },
{ type: "exponentMinusSign", value: "\u061c-" },
{ type: "exponentInteger", value: "\u0661" },
]);
@ -356,12 +356,12 @@ describe("style=decimal", () => {
{ type: "integer", value: "\u0661" },
{ type: "decimal", value: "\u066b" },
{ type: "fraction", value: "\u0662\u0663\u0664" },
{ type: "exponentSeparator", value: "\u0627\u0633" },
{ type: "exponentSeparator", value: "\u0623\u0633" },
{ type: "exponentInteger", value: "\u0663" },
]);
expect(ar.formatToParts(0.12)).toEqual([
{ type: "integer", value: "\u0661\u0662\u0660" },
{ type: "exponentSeparator", value: "\u0627\u0633" },
{ type: "exponentSeparator", value: "\u0623\u0633" },
{ type: "exponentMinusSign", value: "\u061c-" },
{ type: "exponentInteger", value: "\u0663" },
]);