From 37c26a41a140b1b3ae664bd57d5a41d98ba79ce5 Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Fri, 10 Apr 2026 14:58:43 +1000 Subject: [PATCH] chore: update NumberParser's cldr data --- packages/@internationalized/number/src/NumberParser.ts | 4 ++-- scripts/generateAllPlurals.mjs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@internationalized/number/src/NumberParser.ts b/packages/@internationalized/number/src/NumberParser.ts index dfeb7c6c24f..6311f920787 100644 --- a/packages/@internationalized/number/src/NumberParser.ts +++ b/packages/@internationalized/number/src/NumberParser.ts @@ -274,9 +274,9 @@ class NumberParserImpl { const nonLiteralParts = new Set(['decimal', 'fraction', 'integer', 'minusSign', 'plusSign', 'group']); -// This list is derived from https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html#comparison and includes +// This list is derived from https://www.unicode.org/cldr/charts/49/supplemental/language_plural_rules.html#comparison and includes // all unique numbers which we need to check in order to determine all the plural forms for a given locale. -// See: https://github.com/adobe/react-spectrum/pull/5134/files#r1337037855 for used script +// Run scripts/generateAllPlurals.mjs to generate this list. const pluralNumbers = [ 0, 4, 2, 1, 11, 20, 3, 7, 100, 21, 0.1, 1.1 ]; diff --git a/scripts/generateAllPlurals.mjs b/scripts/generateAllPlurals.mjs index feb395767e4..12ceb29937b 100644 --- a/scripts/generateAllPlurals.mjs +++ b/scripts/generateAllPlurals.mjs @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -/* Scrapes data on CLDR https://www.unicode.org/cldr/charts/44/supplemental/language_plural_rules.html#comparison +/* Scrapes data on CLDR https://www.unicode.org/cldr/charts/49/supplemental/language_plural_rules.html#comparison * and generates a list of all possible values needed between all locales for plural rules. * It is used by our NumberParser to generate all literal strings, ex units 1 foot, 2 feet, but other locales have more than 2 forms. */ @@ -150,7 +150,7 @@ function extractTable(dom, integerTable, fractionTable) { return Array.from(values); } -fetch('https://www.unicode.org/cldr/charts/44/supplemental/language_plural_rules.html#comparison') +fetch('https://www.unicode.org/cldr/charts/49/supplemental/language_plural_rules.html#comparison') .then(async (response) => { let data = await response.text(); const dom = new JSDOM(data);