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
Notes: sideshowbarker 2024-07-17 18:23:22 +09:00
6 changed files with 30 additions and 32 deletions

View File

@ -1,6 +1,6 @@
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
set(CLDR_VERSION 43.1.0)
set(CLDR_VERSION 44.0.1)
set(CLDR_PATH "${SERENITY_CACHE_DIR}/CLDR" CACHE PATH "Download location for CLDR files")
set(CLDR_VERSION_FILE "${CLDR_PATH}/version.txt")

View File

@ -188,11 +188,9 @@ describe("correct behavior", () => {
{ calendar: "gregory", en: "Gregorian Calendar", es419: "calendario gregoriano", zhHant: "公曆" },
{ calendar: "hebrew", en: "Hebrew Calendar", es419: "calendario hebreo", zhHant: "希伯來曆" },
{ calendar: "indian", en: "Indian National Calendar", es419: "calendario nacional hindú", zhHant: "印度國曆" },
{ calendar: "islamic", en: "Islamic Calendar", es419: "calendario islámico", zhHant: "伊斯蘭曆" },
{ calendar: "islamic-civil", en: "Islamic Calendar (tabular, civil epoch)", es419: "calendario islámico tabular", zhHant: "伊斯蘭民用曆" },
{ calendar: "islamic-rgsa", en: "Islamic Calendar (Saudi Arabia, sighting)", es419: "calendario islámico (Arabia Saudita)", zhHant: "伊斯蘭新月曆" },
{ calendar: "islamic-tbla", en: "Islamic Calendar (tabular, astronomical epoch)", es419: "calendario islámico tabular", zhHant: "伊斯蘭天文曆" },
{ calendar: "islamic-umalqura", en: "Islamic Calendar (Umm al-Qura)", es419: "calendario islámico Umm al-Qura", zhHant: "烏姆庫拉曆" },
{ calendar: "islamic", en: "Hijri Calendar", es419: "calendario hijri", zhHant: "伊斯蘭曆" },
{ calendar: "islamic-civil", en: "Hijri Calendar (tabular, civil epoch)", es419: "calendario hijri tabular", zhHant: "伊斯蘭民用曆" },
{ calendar: "islamic-umalqura", en: "Hijri Calendar (Umm al-Qura)", es419: "calendario hijri Umm al-Qura", zhHant: "伊斯蘭曆(烏姆庫拉)" },
{ calendar: "iso8601", en: "ISO-8601 Calendar", es419: "calendario ISO-8601", zhHant: "ISO 8601 國際曆法" },
{ calendar: "japanese", en: "Japanese Calendar", es419: "calendario japonés", zhHant: "日本曆" },
{ calendar: "persian", en: "Persian Calendar", es419: "calendario persa", zhHant: "波斯曆" },

View File

@ -18,10 +18,10 @@ test("normal behavior", () => {
expect(new Intl.Locale("und").maximize().toString()).toBe("en-Latn-US");
expect(new Intl.Locale("und-Thai").maximize().toString()).toBe("th-Thai-TH");
expect(new Intl.Locale("und-419").maximize().toString()).toBe("es-Latn-419");
expect(new Intl.Locale("und-150").maximize().toString()).toBe("ru-Cyrl-RU");
expect(new Intl.Locale("und-150").maximize().toString()).toBe("en-Latn-150");
expect(new Intl.Locale("und-AT").maximize().toString()).toBe("de-Latn-AT");
expect(new Intl.Locale("und-Cyrl-RO").maximize().toString()).toBe("bg-Cyrl-RO");
expect(new Intl.Locale("und-AQ").maximize().toString()).toBe("und-Latn-AQ");
expect(new Intl.Locale("und-AQ").maximize().toString()).toBe("en-Latn-AQ");
});
test("keywords are preserved", () => {

View File

@ -23,7 +23,7 @@ test("normal behavior", () => {
expect(new Intl.Locale("ru-Cyrl-RU").minimize().toString()).toBe("ru");
expect(new Intl.Locale("de-Latn-AT").minimize().toString()).toBe("de-AT");
expect(new Intl.Locale("bg-Cyrl-RO").minimize().toString()).toBe("bg-RO");
expect(new Intl.Locale("und-Latn-AQ").minimize().toString()).toBe("und-AQ");
expect(new Intl.Locale("und-Latn-AQ").minimize().toString()).toBe("en-AQ");
});
test("keywords are preserved", () => {

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" },
]);