Skip to content

Export alt attribute consistently #125

@movermeyer

Description

@movermeyer

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)",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions