-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle <alias>
nodes
#78
Comments
Another example: The These are incorrectly getting output as: eras:
abbr:
0: BCE
1: CE
name:
0: ''
narrow:
0: '' |
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 13, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 15, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 15, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 15, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 15, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 15, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
movermeyer
added a commit
to movermeyer/ruby-cldr
that referenced
this issue
Nov 15, 2021
`type` is a required attribute of `era` tags. `<alias>` tags are present in the `:root` locale and were incorrectly getting output as: ```yaml eras: abbr: 0: BCE 1: CE name: 0: '' narrow: 0: '' ``` Until ruby-i18n#78 is addressed, I figure it is better not to output any data, rather than incorrect data.
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
root
locale contains<alias>
elements that tell the reader that they should restart their search with a different key.Example resolution
For example, resolving
//ldml/dates/fields/field[@type="hour-narrow"]/relative[@type=0]
foren_GB
in CLDR v34 (for example) should look at://ldml/dates/fields/field[@type="hour-narrow"]/relative[@type=0]
incommon/main/en_GB.xml
//ldml/dates/fields/field[@type="hour-narrow"]/relative[@type=0]
incommon/main/en_001.xml
//ldml/dates/fields/field[@type="hour-narrow"]/relative[@type=0]
incommon/main/en.xml
Before finally
//ldml/dates/fields/field[@type="hour-narrow"]/relative[@type=0]
incommon/main/root.xml
, where it finds the alias:And restarts the search using
hour-short
, which in turn leads to another alias, restarting the search usinghour
, which is eventually resolves to:this hour
from//ldml/dates/fields/field[@type="hour"]/relative[@type=0]
incommon/main/en.xml
.Steps to reproduce
data/en-GB.yml
to contain aen-GB.fields.hour-narrow.relative.0
key with the value ofthis hour
data/en.yml
to contain aen.fields.hour-narrow.relative.0
key with the value ofthis hour
Once exported, there is no information in the exported YAML files about aliases.
This means that a client cannot know to use the
en-GB.fields.hour.relative.0
key instead (foren-GB
), which exists.(Aside: this example uses
--merge
, but it equally applies to the non-merged case. I used the--merge
case for simplicity)Impact of this issue
Data exports are incomplete. Any aliased field is missing a corresponding value in the exported files.
The above
hour-narrow
example is not that impactful (clients lose access to thehour-narrow
format 🤷).In other cases,
<alias>
elements are used for more impactful values. For example, the Buddhist calendar data are largely aliased to Gregorian calendar data.While
ruby-cldr
doesn't currently export Buddhist calendar information, if it were to, it's lack of<alias>
handling would mean that the Buddhist calendar would be missing most of its data entirely.Another example: The symbols for many numbering systems are aliased to the Latin number symbols. Without resolving the aliases, the symbols are not present in the exported data (Actually, they are, but that's due to another bug).
Potential Solution
Output aliases in the manner supported by
ruby-i18n/i18n
'sSymbol
resolving.If
--merge
flag is used, resolve the value and output that instead.The text was updated successfully, but these errors were encountered: