ruby-cldr
ruby-cldr copied to clipboard
Make RBNF fall back to root
The RBNF for individual locales do not fall back to root
. This is wrong. In particular, many locales rely on digits-ordinal
being inherited from root
.
The format currently exported by Rbnf
is not suitable for merging. This PR suggests a different format. I do not have strong opinions on the specific format.
I am not sure about the intention behind Rbnf. I assume it is to avoid duplicating NumberingSystemRules
in every locale. My patch is based on this assumption.
The output in xx/rbnf.yml looks like this:
---
da:
rbnf:
grouping:
ordinal_rules:
digits-ordinal:
rules:
"-x":
rule: "−>>;"
'0':
rule: "=#,##0=.;"
spellout_rules:
and-small:
access: private
rules:
'0':
rule: og =%spellout-cardinal-common=;
'100':
rule: "=%spellout-cardinal-common=;"
The output in rbnf_root.yml looks like this:
---
rbnf:
grouping:
numbering_system_rules:
cyrillic-lower-post:
rules:
'0':
rule: ҃;
'1':
rule: "=%cyrillic-lower=;"
access: private
armenian-lower:
rules:
"-x":
rule: "−>>;"
x.x:
rule: "=#,##0.00=;"
'0':
rule: 0;
'1':
rule: ա;