ruby-cldr
ruby-cldr copied to clipboard
Export `alt` attribute consistently
CLDR has an alt attribute that can be used to indicate a different things:
alt=proposed\d*andalt=#{variantname}-proposed\d*indicate proposed values that will replace the non-altversion of the value. They will always have adraftattribute, since as soon as they get theacceptedstatus, the non-altversion 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:
<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)",