Skip to content

CLDR-19918 CLDR-19920 Fix RBNF spell-out errors in 15 locales - #6295

Merged
grhoten merged 1 commit into
unicode-org:mainfrom
dblock:dblock/rbnf-fixes
Dec 2, 2026
Merged

grhoten merged 1 commit into
unicode-org:mainfrom
dblock:dblock/rbnf-fixes

Conversation

@dblock

@dblock dblock commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

CLDR-19918
CLDR-19920

  • This PR completes the ticket.

Fixes the spell-out errors reported in CLDR-19918 (as triaged in https://unicode-org.atlassian.net/browse/CLDR-19918?focusedCommentId=213204) and CLDR-19920 (as evaluated in https://unicode-org.atlassian.net/browse/CLDR-19920?focusedCommentId=213245).

CLDR-19918: az, hy, ka, ro and da, following the "Change" items in the triage comment, including the unreported ones (az ordinal vowel harmony and milyard; hy տասը, միլիոն, տրիլիոն, and կվադրիլիոն at 10^15; ka ტრილიონი and კვადრილიონი at 10^15; da neuter ordinals tusinde, tusind og første, million første). Not changed: the "probably" items (az bir yüz/bir min, hy 100/200/1000), da fyrrende (judgment call), and ar, which is being fixed separately; note that the same hamza issue as إثنان is in إثنتان, إثنا عشر and إثنتا عشرة. The da fix also changes the neuter ordinals 1001–1999 from "tusinde …" to "tusind …", matching the common rule set.

CLDR-19920: sl, hr, bs, mk, be, is, lo, sq, af, eo, following the "Change" items in the evaluation comment, including the broader and unreported ones:

  • be: the ordinal rules from 1000 up (which gave "адна тысячны", "дзвух тысячны", "пяць тысячны", the cardinal for 21000 and 1,000,000, and the wrong gender endings) are rebuilt with [<< тысяча >>|…тысячны]-style rules and a private %%ordinal-prefix for the joined genitive forms (двухтысячны, пяцітысячны, дваццаціаднатысячны, мільённы). 700 and 800 are "сямсот" and "васямсот" in every gender, as the evaluation recommends, rather than "семсот" as the ticket asked; ordinal 600 is "шасцісоты"; masculine 1 is "адзін" with a Cyrillic і; "трыльёнаў"; and the ordinal tens are пяцідзясяты, шэсцідзясяты, сямідзясяты in every gender (the "probably" item; a Belarusian reviewer should confirm).
  • is: "og" goes only before the last element, through new private %%and-* rule sets; this changes most outputs above 100. Also milljón/milljónir, einn milljarður/tveir milljarðar, billjón/billjónir, einn billjarður/tveir billjarðar.
  • mk: hundreds via a %%hundreds list (сто, двесте, четиристотини), "илјада" for 1000, plural scale words, feminine милијарда and билијарда, and "и" before a final one-word part via %%and-* rule sets.
  • bs: scale words inflect (dvije hiljade, pet miliona, jedna milijarda / dvije milijarde / pet milijardi, dva biliona, jedna bilijarda / dvije bilijarde / pet bilijardi).
  • sq: miliard/miliardë and biliard/biliardë.
  • af: ordinals 1000 and up no longer start with "een" (duisendste, duisend en eerste), and "en" goes before a final single-word part (1–20 or round tens) in cardinals and ordinals: honderd en een, honderd en tweede, honderd en twintig, but honderd een-en-twintig (the "probably" item).
  • eo: ordinals of round millions are "miliona", "du-miliona", and the same for miliardo, biliono and biliardo. Multi-word ordinals are hyphenated wherever the number has spaces, as PMEG §23.4 prefers (dudek-unua, du-mila, mil-sepcent-tridek-dua, dudek-unu-miliona), through a private %%cardinal-hyphenated rule set; this changes every multi-word ordinal.
  • hr: the masculine, neuter and feminine accusative rule sets get their own scale rules, with the multiplier in the feminine accusative for feminine scale words and the remainder in the rule set's own accusative: dvadeset i jednu tisuću, jednu milijardu, dvadeset i jednu milijardu, jednu bilijardu. The feminine accusative also gets its own rules below 1000, so 21 is "dvadeset i jednu" (was "dvadeset i jedna").
  • Left as is: af year forms such as "elf honderd nul" for 1100, unchanged and not reported.

Validation: every output change was reviewed by formatting all public rule sets for 0–2100 and a set of larger numbers with ICU 79 before and after; the only changes are the intended ones, and no two numbers format identically within a rule set. Test data regenerated with generate-rbnf-ssv, TestRBNF passes, and the files are well-formed XML. lo.ssv keeps its existing numbers: the generator now also adds 2^53−1, which does not parse back in Lao (nor would it in Thai) because of the repeated ລ້ານ, independently of this change.

This PR was prepared by Claude (AI) on behalf of @dblock, who reported both tickets.

@CLAassistant

CLAassistant commented Nov 23, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@grhoten

grhoten commented Nov 28, 2026

Copy link
Copy Markdown
Member

Thanks for the pull request. I added some additional comments to the tickets that will need to be addressed. My hope is that these tickets will be approved next week when I attend the meeting.

@jira-pull-request-webhook

Copy link
Copy Markdown

Notice: the branch changed across the force-push!

  • common/rbnf/af.xml is different
  • common/rbnf/be.xml is different
  • common/rbnf/bs.xml is different
  • common/rbnf/eo.xml is different
  • common/rbnf/is.xml is different
  • common/rbnf/mk.xml is different
  • common/rbnf/sq.xml is different
  • common/testData/rbnf/af.ssv is different
  • common/testData/rbnf/be.ssv is different
  • common/testData/rbnf/bs.ssv is different
  • common/testData/rbnf/eo.ssv is different
  • common/testData/rbnf/is.ssv is different
  • common/testData/rbnf/mk.ssv is different
  • common/testData/rbnf/sq.ssv is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@dblock

dblock commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @grhoten. I updated the PR per your evaluation in https://unicode-org.atlassian.net/browse/CLDR-19920?focusedCommentId=213245 and amended it into the single commit; the PR description lists everything. Beyond what was already here:

  • be: 700/800 are now сямсот/васямсот in every gender, as you recommended (the PR had followed the ticket's семсот); адзін with a Cyrillic і; трыльёнаў; шасцісоты; and the ordinal tens пяцідзясяты, шэсцідзясяты, сямідзясяты (-ая, -ае) in every gender.
  • bs: bilion/biliona and jedna bilijarda, dvije bilijarde, pet bilijardi.
  • mk: илјада for 1000; билијарда is feminine.
  • is: billjón/billjónir and einn billjarður, tveir billjarðar.
  • sq: biliard/biliardë.
  • af: duisendste, duisend en eerste; and "en" before a final single-word part in cardinals and ordinals (honderd en een, honderd en tweede), your "probably" item.
  • eo: du-miliona, du-miliarda, etc.

One thing I left alone: the hr accusative of compound thousands. On main it was "dvadeset i jedna tisuću"; with the nominative fix it is now "dvadeset i jedna tisuća", and it should be "jednu tisuću". The accusative rule sets delegate to the nominative ones, so fixing it needs accusative scale rules. I can add those here or in a follow-up, whichever you prefer.

Test data was regenerated, TestRBNF passes, and no two numbers from 0 to 2100 (plus a set of larger ones) format the same within any rule set.

This comment was written by Claude (AI) on behalf of @dblock.

@grhoten

grhoten commented Nov 30, 2026

Copy link
Copy Markdown
Member

Thanks for the updates. Three more things before this is ready:

hr: accusative of compound thousands and feminine scale words

My triage comment was wrong to say the accusative was already right. %spellout-cardinal-masculine-accusative and %spellout-cardinal-neuter-accusative are pure aliases of the nominative, and %spellout-cardinal-feminine-accusative only overrides 0, 1 and Inf. So every number from 1,000 up uses nominative forms. Before this pull request, the accusative of 21,000 was "dvadeset i jedna tisuću". Now it is "dvadeset i jedna tisuća". So for the accusative, this pull request makes things slightly worse. The feminine scale words above a thousand have the same problem, which independent of this pull request:

Number Current accusative Expected accusative
21,000 dvadeset i jedna tisuća dvadeset i jednu tisuću
1,000,000,000 jedna milijarda jednu milijardu
21,000,000,000 dvadeset i jedna milijarda dvadeset i jednu milijardu
1,000,000,000,000,000 jedna bilijarda jednu bilijardu
21,000,000,000,000,000 dvadeset i jedna bilijarda dvadeset i jednu bilijardu

Only the one forms differ. The few/other forms (tisuće/tisuća, milijarde/milijardi) are the same in both cases, and milijun/bilijun are masculine inanimate, so they're already right. Please add the accusative scale rules in this pull request. The multiplier should use %spellout-cardinal-feminine-accusative. The one forms should be tisuću, milijardu and bilijardu, and the remainder should continue in the rule set's own accusative.

hy and ka: 1,000,000,000,000,000

Now that 1,000,000,000,000 is the short-scale "տրիլիոն" / "ტრილიონი", keeping the long-scale "բիլիար" / "ბილიარდი" at 1,000,000,000,000,000 mixes the two scales. The Armenian word is also missing the final դ that this pull request just restored in "միլիարդ". Please change 1,000,000,000,000,000 to "կվադրիլիոն" and "კვადრილიონი" here rather than leaving them for later.

eo: hyphens in multi-word ordinals

Only the new million-and-up rules add a hyphen, so the output is inconsistent:

  • 2,000th: "du mila"
  • 2,000,000th: "du-miliona"
  • 21,000,000th: "dudek unu-miliona" (the hyphen joins only the last word)

Please verify if the hyphen usage should be consistent at every scale word. For example, should "mil" be treated like the others ("du-mila") and hyphenate the whole multiplier ("dudek-unu-miliona").

@jira-pull-request-webhook

Copy link
Copy Markdown

Notice: the branch changed across the force-push!

  • common/rbnf/eo.xml is different
  • common/rbnf/hr.xml is different
  • common/rbnf/hy.xml is different
  • common/rbnf/ka.xml is different
  • common/testData/rbnf/eo.ssv is different
  • common/testData/rbnf/hr.ssv is now changed in the branch
  • common/testData/rbnf/hy.ssv is different
  • common/testData/rbnf/ka.ssv is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

CLDR-19918, as triaged in its comments:
- az: altmış, səksən; ordinals 70 and 80 use %%inci (yetmişinci,
  səksəninci); ordinal 1000 min, 10^9 milyard.
- hy: 10 alone տասը (տասն stays the combining form); իննսուն; միլիոն,
  միլիարդ, տրիլիոն, կվադրիլիոն.
- ka: თვრამეტი; 10^12 ტრილიონი, 10^15 კვადრილიონი.
- ro: neuter cardinal o sută, o mie.
- da: neuter ordinals tusinde, tusind og første, million første.

CLDR-19920, as evaluated in its comments:
- sl: 21, 31, ... enaindvajset, not enegaindvajset.
- hr: dvadeset i jedna tisuća; accusative scale words (dvadeset i jednu
  tisuću, jednu milijardu, jednu bilijardu) and feminine accusative
  below 1000 (dvadeset i jednu).
- bs: jedna, dvije, dvjesta, jedanaest, šesnaest, četiristo; hiljadu,
  dvije hiljade, tri miliona, pet miliona; jedna milijarda, bilion(a),
  jedna bilijarda (dvije bilijarde, pet bilijardi).
- mk: сто, двесте, четиристотини; илјада for 1000; plural scale words
  (две илјади, два милиони), feminine милијарда and билијарда; neuter
  две; и before a final one-word part (сто и еден).
- be: трэці, чацвёрты, двухсоты, шасцісоты; пяцьдзясят, шэсцьдзясят;
  сямсот and васямсот in every gender; адзін with a Cyrillic і;
  трыльёнаў; ordinal tens пяцідзясяты, шэсцідзясяты, сямідзясяты in
  every gender; ordinals from 1000 rebuilt (тысячны, двухтысячны,
  дваццаціаднатысячны).
- is: sjö; tvö hundruð without the soft hyphen; milljón(ir), einn
  milljarður, billjón(ir), einn billjarður (tveir billjarðar); og only
  before the last element.
- lo: Lao words for zero, the places from a hundred, the ordinal prefix,
  minus and the decimal point, replacing Thai ones.
- sq: miliard, biliard.
- af: sewende, agtste, negende; duisendste, duisend en eerste; en
  before a final single-word part (honderd en een, honderd en tweede).
- eo: ordinals of round millions (miliona, du-miliona); multi-word
  ordinals hyphenated throughout (dudek-unua, du-mila,
  dudek-unu-miliona), as PMEG 23.4 prefers.

Test data regenerated with generate-rbnf-ssv. lo.ssv keeps its existing
numbers: the generator now also adds 2^53-1, which does not parse back
in Lao (or Thai) with repeated ລ້ານ, independently of this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jira-pull-request-webhook

Copy link
Copy Markdown

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

~ Your Friendly Jira-GitHub PR Checker Bot

@dblock

dblock commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @grhoten, all three are addressed and amended into the single commit.

hr: the masculine, neuter and feminine accusative rule sets now have their own scale rules. Feminine scale words take a %spellout-cardinal-feminine-accusative multiplier with tisuću, milijardu and bilijardu as the one forms, and the remainder continues in the rule set's own accusative. Every row of your table now gives the expected form, e.g. dvadeset i jednu tisuću, jednu milijardu, dvadeset i jednu bilijardu. To make the feminine remainder right, the feminine accusative also gets its own rules below 1000 instead of delegating to the nominative, so 21 is now "dvadeset i jednu" (was "dvadeset i jedna"), 1001 is "tisuću jednu", and 2001 is "dvije tisuće jednu".

hy and ka: 10^15 is now "կվադրիլիոն" and "კვადრილიონი" (e.g. մեկ կվադրիլիոն, ერთი კვადრილიონ ერთი).

eo: PMEG §23.4 (https://bertilow.com/pmeg/gramatiko/nombroj/a-vortoj.html) accepts spaced ordinals, but prefers hyphens wherever the number has spaces: "Se oni kunmetas, oni por klareco prefere skribu dividostrekojn tie, kie estas spacetoj en la origina plurvorta nombro", with examples such as dudek-sepa and mil-sepcent-tridek-dua. So every multi-word ordinal is now hyphenated, through a private %%cardinal-hyphenated rule set: dudek-unua, cent-dudek-unua, du-mila, du-mil-unua, dudek-unu-mila, du-miliona, dudek-unu-miliona, du-milionoj-unua. This changes all multi-word eo ordinals, not just those from a million up.

Test data for eo, hr, hy and ka was regenerated with generate-rbnf-ssv, TestRBNF passes, and the files are well-formed XML. The PR description is updated.

This comment was written by Claude (AI) on behalf of @dblock.

Comment thread common/rbnf/af.xml
Comment on lines +69 to +73
%%en:
1: ' en =%spellout-cardinal=;
21: ' =%spellout-cardinal=;
30: ' en =%spellout-cardinal=;
31: ' =%spellout-cardinal=;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note to self: Normally we would use the or-else notation, but the the irregular pattern makes it difficult to use such syntax.

Comment thread common/rbnf/be.xml
Comment on lines +184 to +185
1000: [<%spellout-cardinal-feminine< тысяча >>|тысячны];
2000: [<%spellout-cardinal-feminine< $(cardinal,one{тысяча}few{тысячы}other{тысяч})$ >>|<%%ordinal-prefix<тысячны];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a good modernization change now that the syntax exists. The previous rules predate such syntax existing.

Comment thread common/rbnf/bs.xml
Comment on lines +61 to +63
1000: hiljadu[ >>];
2000: <%spellout-cardinal-feminine< $(cardinal,one{hiljada}few{hiljade}other{hiljada})$[ >>];
1000000: <%spellout-cardinal-masculine< $(cardinal,one{milion}few{miliona}other{miliona})$[ >>];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a good modernization change now that the syntax exists. The previous rules predate such syntax existing.

Comment thread common/rbnf/mk.xml
Comment on lines +54 to +58
2000: <%spellout-cardinal-feminine< $(cardinal,one{илјада}other{илјади})$[ >%%and-masculine>];
1000000: <%spellout-cardinal-masculine< $(cardinal,one{милион}other{милиони})$[ >%%and-masculine>];
1000000000: <%spellout-cardinal-feminine< $(cardinal,one{милијарда}other{милијарди})$[ >%%and-masculine>];
1000000000000: <%spellout-cardinal-masculine< $(cardinal,one{билион}other{билиони})$[ >%%and-masculine>];
1000000000000000: <%spellout-cardinal-feminine< $(cardinal,one{билијарда}other{билијарди})$[ >%%and-masculine>];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a good modernization change now that the syntax exists. The previous rules predate such syntax existing.

@grhoten
grhoten merged commit d978a8b into unicode-org:main Dec 2, 2026
9 checks passed
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.

3 participants