Skip to content
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

Export alt attribute consistently #125

Open
movermeyer opened this issue Apr 20, 2022 · 0 comments
Open

Export alt attribute consistently #125

movermeyer opened this issue Apr 20, 2022 · 0 comments

Comments

@movermeyer
Copy link
Collaborator

movermeyer commented Apr 20, 2022

CLDR has an alt attribute that can be used to indicate a different things:

  • alt=proposed\d* and alt=#{variantname}-proposed\d* indicate proposed values that will replace the non-alt version of the value. They will always have a draft attribute, since as soon as they get the accepted status, the non-alt version is replaced.
  • alt=#{variantname} indicates an alternative value that really ought to be used in specific conditions.

Currently, ruby-cldr filters out values with an alt attribute in some places using the Base#alt? method. However, it's inconsistently applied.

We might want to export data with alt=#{variantname} style attributes, perhaps using a separate key name. cldr-json does this:

Upstream CLDR XML:

<language type="en_US">Engels (VSA)</language>
<language type="en_US" alt="short">Engels (VSA)</language>

gets exported as:

"en-US": "Engels (VSA)",
"en-US-alt-short": "Engels (VSA)",
movermeyer added a commit that referenced this issue Apr 21, 2022
Until we know what we want to do with them. Ref #125
@movermeyer movermeyer mentioned this issue Apr 21, 2022
1 task
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

No branches or pull requests

1 participant