tilezen / vector-datasource

Tilezen vector tile service - OpenStreetMap data in several formats
https://www.nextzen.org/
Other
507 stars 119 forks source link

Add full support for traditional and simplified Chinese labels #1955

Open peitili opened 3 years ago

peitili commented 3 years ago

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

nvkelso commented 3 years ago

New preview files:

This would need to be updated here:

nvkelso commented 3 years ago

I think we take country names from OSM, so not clear why these are in the import statement: