From a1b0198ecb877e254d476f491271208f56c332ec Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 12 Dec 2023 14:46:01 +0200 Subject: [PATCH 1/2] Add a for :number, together with :ordinal & :plural aliases --- spec/registry.xml | 65 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/spec/registry.xml b/spec/registry.xml index 25fff3695a..267a1ac352 100644 --- a/spec/registry.xml +++ b/spec/registry.xml @@ -141,7 +141,7 @@ - Locale-sensitive number formatting + Locale-sensitive number formatting and selection @@ -243,11 +243,72 @@ + + + + + + + + + + + - Locale-sensitive integral number formatting + Locale-sensitive integral number formatting and selection + + + Ordinal number selection + + + + + Plural number selection + + From db1343ff9df17125b9d30035fd0b0462a29de2d4 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 12 Dec 2023 17:35:51 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Addison Phillips --- spec/registry.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/spec/registry.xml b/spec/registry.xml index 267a1ac352..f7e478cc13 100644 --- a/spec/registry.xml +++ b/spec/registry.xml @@ -141,7 +141,7 @@ - Locale-sensitive number formatting and selection + Number selection and formatting @@ -249,12 +249,13 @@ The number selection type. - With `exact` selection, only a variant with a key matching - the JSON representation of the input number (without an exponent) will be selected. - With `plural` and `ordinal` selection, if no such exactly matching key is present, - a variant with the matching CLDR plural category (`zero`/`one`/`two`/`few`/`many`/`other`) - for the corresponding selection type will be selected, - according to the rules of the current locale + One of three selection models for numeric values, defaulting to "plural". + + Each selector type matches numeric values to keys using the "number-literal" + production from the ABNF. + The "plural" and "ordinal" selectors also use plural or ordinal rules from CLDR + to match categories "zero", "one", "two", "few", "many" and "other" with a lower + match quality than exact numeric match. - Locale-sensitive integral number formatting and selection + Integer selection and formatting