-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chinese parser for OSM #1956
Chinese parser for OSM #1956
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice - I'm assuming you'll add two more for the other two data sources in a followup. Nice work with the tests exactly laying out how your code works
@@ -612,6 +623,42 @@ def _convert_osm_l10n_name(x): | |||
return LangResult(code=result, priority=priority) | |||
|
|||
|
|||
def post_process_osm_zh(properties): | |||
""" First check whether name:zh (Simplified) and name:zht(Traditional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit to address to make sure intermediate processing data is not exported into tiles (it's been an issue in the past we should always guard against).
ok, I will remove the zh-default prop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the docs
checkmark, thanks for updating the TESTS.md, but please also update
https://github.com/tilezen/vector-datasource/blob/master/docs/layers.md#name-localization
With a note about name:zh
(Simplified Chinese characters as used in China and Singapore) and name:zht
for (Traditional Chinese characters used in Taiwan, Hong Kong, Macau) and how the data value backfilling works, and that we don't auto-translate to simplified <> traditional.
@nvkelso |
fixed |
'name:zh': u'旧金山', | ||
'name:zht': u'舊金山'}) | ||
|
||
self.assert_no_matching_feature(16, 10482, 25330, 'places', {'name:zh-default': u'旧金山/三藩市/舊金山'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please format this onto multiple lines like the other assert for legibility / convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great inaugural PR, thank you!
The documentation changes work for me, though please address the 3 nits comments I left (all formatting) before merging the PR.
#1955