Skip to content

Conversation

@gosplit
Copy link

@gosplit gosplit commented Mar 9, 2023

Spanish ordinal numbers First and Third will drop o in masculine adjective forms.
e.g., 1st day, 2nd day, 3rd day, 4th day, 5th day (English)= 1ᵉʳ día, 2º día, 3ᵉʳ día, 4º día, 5º día (Spanish)

The supplemental/ordinals.xml should be updated accordingly.

Reference 1: CLDR rbnf of es:

cldr/common/rbnf/es.xml

Lines 289 to 297 in 835e0c9

<ruleset type="dord-mascabbrev" access="private">
<rbnfrule value="0">º;</rbnfrule>
<rbnfrule value="1">ᵉʳ;</rbnfrule>
<rbnfrule value="2">º;</rbnfrule>
<rbnfrule value="3">ᵉʳ;</rbnfrule>
<rbnfrule value="4">º;</rbnfrule>
<rbnfrule value="20">→→;</rbnfrule>
<rbnfrule value="100">→→;</rbnfrule>
</ruleset>

Reference 2: https://www.spanish.academy/blog/ordinal-numbers/

CLDR-16292

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@CLAassistant
Copy link

CLAassistant commented Mar 9, 2023

CLA assistant check
All committers have signed the CLA.

@gosplit gosplit changed the title Spanish ordinals dropping o of ~1 and ~3 CLDR-16292 Spanish ordinals dropping o of ~1 and ~3 Mar 9, 2023
@gosplit gosplit force-pushed the CLDR-16292-Plural-rules-in-Spanish-should-return-different-ordinal-types-for-number-1-and-3 branch from b876335 to dac88c4 Compare March 10, 2023 09:24
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

Ordinal numbers`Primero` and `Tercero` will drop `o` in masculine adjective forms.
e.g., 1st/2nd/3rd/4th/5th = 1er/2o/3er/4o/5o (adj. form)
Ref. https://www.spanish.academy/blog/ordinal-numbers/
@gosplit gosplit force-pushed the CLDR-16292-Plural-rules-in-Spanish-should-return-different-ordinal-types-for-number-1-and-3 branch from dac88c4 to 7987073 Compare March 10, 2023 09:27
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@gosplit gosplit changed the title CLDR-16292 Spanish ordinals dropping o of ~1 and ~3 CLDR-16292 Update supplemental/ordinals.xml for Spanish ordinal numbers of ~1 and ~3 Mar 10, 2023
<pluralRule count="other"> @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …</pluralRule>
</pluralRules>
<pluralRules locales="es">
<pluralRule count="one">n % 10 = 1,3 @integer 1, 3, 11, 13, 21, 23, 31, 33, 41, 43, 51, 53, 101, 103, 1001, 1003, …</pluralRule>
Copy link
Member

@grhoten grhoten May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot the and n % 100 != 11 and n % 100 != 13. This rule doesn’t apply to 11 and 13 as can be seen in the Number Format Tester.

It’s worth mentioning that these rules only apply towards the masculine adjective form of ordinals and not the other ordinal forms.

Copy link
Author

@gosplit gosplit Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @grhoten, Thanks for the review,

For orindal 13:
I believe the Number Format Tester could be incorrect. You can check the spellout-ordinal-masculine-adjective in the rbnf of es.xml.

<rbnfrule value="13">decimo→→;</rbnfrule>

The masculine adjective ordinal of 13(decimotercero) will become decimotercer. This means it will apply the rule, drop o and becomes 13ᵉʳ

For orindal 11:
Meanwhile, the ordinal of 11 is more complex, it could be undécimo,decimoprimero or onceno depends on users in different countries or regions. Reference: undécimo y decimoprimero, formas válidas

The rule only applies to decimoprimero, but not to the others. While the rbnf of es.xml prefers to undécimo, I am keeping 11 unchanged and adding the rule on 13 in rnbf and ordinals.xml

Please help to review again.

@gosplit gosplit requested a review from grhoten June 26, 2023 07:32
@gosplit gosplit force-pushed the CLDR-16292-Plural-rules-in-Spanish-should-return-different-ordinal-types-for-number-1-and-3 branch from 56cdb46 to 8d53b44 Compare June 26, 2023 08:41
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • common/rbnf/es_419.xml is now changed in the branch
  • common/rbnf/es.xml is now changed in the branch
  • common/supplemental/ordinals.xml is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@gosplit gosplit force-pushed the CLDR-16292-Plural-rules-in-Spanish-should-return-different-ordinal-types-for-number-1-and-3 branch from 8d53b44 to fdd219c Compare June 26, 2023 09:43
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@grhoten
Copy link
Member

grhoten commented Jun 27, 2023

So if you're trying to fix the RBNF ordinal digit rules in this pull request, then you'll need to use the ordinal rule syntax, just like the English rules.

diff --git a/common/rbnf/es.xml b/common/rbnf/es.xml
index 2ce8d8d3ab..c995eda2bf 100644
--- a/common/rbnf/es.xml
+++ b/common/rbnf/es.xml
@@ -286,18 +286,9 @@ For terms of use, see http://www.unicode.org/copyright.html
             </ruleset>
         </rulesetGrouping>
         <rulesetGrouping type="OrdinalRules">
-            <ruleset type="dord-mascabbrev" access="private">
-                <rbnfrule value="0">º;</rbnfrule>
-                <rbnfrule value="1">ᵉʳ;</rbnfrule>
-                <rbnfrule value="2">º;</rbnfrule>
-                <rbnfrule value="3">ᵉʳ;</rbnfrule>
-                <rbnfrule value="4">º;</rbnfrule>
-                <rbnfrule value="20">→→;</rbnfrule>
-                <rbnfrule value="100">→→;</rbnfrule>
-            </ruleset>
             <ruleset type="digits-ordinal-masculine-adjective">
                 <rbnfrule value="-x">−→→;</rbnfrule>
-                <rbnfrule value="0">=#,##0=.=%%dord-mascabbrev=;</rbnfrule>
+                <rbnfrule value="0">=#,##0=.$(ordinal,one{ᵉʳ}other{º})$;</rbnfrule>
             </ruleset>
             <ruleset type="digits-ordinal-masculine">
                 <rbnfrule value="-x">−→→;</rbnfrule>
diff --git a/common/rbnf/es_419.xml b/common/rbnf/es_419.xml
index f0d135ded7..442667c32d 100644
--- a/common/rbnf/es_419.xml
+++ b/common/rbnf/es_419.xml
@@ -13,18 +13,9 @@ For terms of use, see http://www.unicode.org/copyright.html
     </identity>
     <rbnf>
         <rulesetGrouping type="OrdinalRules">
-            <ruleset type="dord-mascabbrev" access="private">
-                <rbnfrule value="0">º;</rbnfrule>
-                <rbnfrule value="1">ᵉʳ;</rbnfrule>
-                <rbnfrule value="2">º;</rbnfrule>
-                <rbnfrule value="3">ᵉʳ;</rbnfrule>
-                <rbnfrule value="4">º;</rbnfrule>
-                <rbnfrule value="20">→→;</rbnfrule>
-                <rbnfrule value="100">→→;</rbnfrule>
-            </ruleset>
             <ruleset type="digits-ordinal-masculine-adjective">
                 <rbnfrule value="-x">−→→;</rbnfrule>
-                <rbnfrule value="0">=#,##0==%%dord-mascabbrev=.;</rbnfrule>
+                <rbnfrule value="0">=#,##0=$(ordinal,one{ᵉʳ}other{º})$.;</rbnfrule>
             </ruleset>
             <ruleset type="digits-ordinal-masculine">
                 <rbnfrule value="-x">−→→;</rbnfrule>

@grhoten
Copy link
Member

grhoten commented Jun 27, 2023

FYI the current RBNF rules don't work correctly. It's kind of hacked together. You can see the parsing issue in the Number Format Tester in a big red warning. This syntax with the revised rules will resolve that issue.

@grhoten
Copy link
Member

grhoten commented Oct 26, 2025

This pull request has been resubmitted as #5163 because this one has conflicts, and this pull request doesn't address the RBNF issue with the correct syntax.

I recommend closing this pull request.

@AEApple
Copy link
Contributor

AEApple commented Oct 29, 2025

replaced by #5163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants