Skip to content

Language code script subtags are incorrectly capitalized #1548

@wavebeem

Description

@wavebeem

According to RFC 5646, script tags within language codes (e.g. the Hans in zh-Hans) should start with a capital letter

They used to start with a capital letter in PokeAPI, but at some point they changed to be lowercased like zh-hans.

This unexpected change caused visual regressions in PKMN.help because my application is using exact string lookup in a translation table right now.

(Edit: I realize now that case-sensitive lookup is a spec violation. This is my fault, but it would still be nice to have the canonical capitalization in PokeAPI)

How to reproduce

  1. https://pokeapi.co/api/v2/pokemon-species/37/
  2. Look under names
  3. See the code zh-hans used instead of zh-Hans

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