vector-datasource
vector-datasource copied to clipboard
Add full support for traditional and simplified Chinese labels
Tilezen remaps localized names into 2-char languages codes from OpenStreetMap, Natural Earth, and OpenStreetMap – which each has their own way of representing name localizations.
In the case of Chinese (and possibly other languages), this "spoken" language has multiple "written" character sets (Traditional and Simplified) and is spoken and written in multiple countries using different configs.
But in Tilezen we only export a generic and ambiguous name:zh
value. In UX design generally it's best practice to target each language as a combination of language + country code to allow for local colloquialisms. But for mapping sometimes less is better / mostly we're dealing in proper nouns - so another alternative is to say zh-hans
(Chinese simplified irresepctive of country) and zh-hant
(Chinese traditiional irrespective of country). Let's pick one and stick with it, and make it work with the point-of-view / worldview being introduced in v5.
For example:
Locale | Description |
---|---|
zh-CN | Chinese (Simplified, PRC) |
zh-SG | Chinese (Simplified, Singapore) |
zh-TW | Chinese (Traditional, Taiwan) |
zh-HK | Chinese (Traditional, Hong Kong S.A.R.) |
https://github.com/tilezen/vector-datasource/blob/024909ed8245a4ad4a25c908413ba3602de6c335/vectordatasource/transform.py#L523-L558
New preview files:
- https://github.com/nvkelso/natural-earth-vector/files/6845759/v5.0.0-pre8-boundaries-pov-chinese.zip
This would need to be updated here:
- https://github.com/tilezen/vector-datasource/blob/master/data/assets.yaml#L121
I think we take country names from OSM, so not clear why these are in the import statement:
- https://github.com/tilezen/vector-datasource/blob/master/data/assets.yaml#L189-L199