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
- https://pokeapi.co/api/v2/pokemon-species/37/
- Look under
names
- See the code
zh-hans used instead of zh-Hans
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
nameszh-hansused instead ofzh-Hans