-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
update 'flipNumberAndStreetCountries' config #1344
Conversation
…des where the label format is "{{street}} {{housenumber}}"
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.
China should not be in the list ?
https://github.com/openstreetmap/iD/blob/a7a375580e61607ac2d25be3d0bb43394bc77e23/data/address-formats.json#L137
Yea I looked at that, it was the last one in the config, but my very unscientific approach was to google '{country} national library' and look at the address format returned. For China I got |
Oh, you are right, it seems that when you write an address in Chinese, the housenumber is after the street, but when it's translated in English the housenumber is before the street. For example the address of the French Embassy in China is:
With the Chinese order: But we write in English: 60 Tianze Rd, San Yuan Qiao, Chaoyang Qu, Chine, 100600 This works almost like Japanese addresses 🤔 |
Oh yea that's super weird 😄 |
There is this cool lib https://github.com/wooorm/franc which I've been considering using for some time. I just wanted to do this PR quickly to solve the linked issue but if anyone has time to do those countries properly using |
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.
Yes, LGTM 😄
Nice. It's good to have (hopefully) handled this completely rather than waiting for indivdiual PRs to come in. |
Thanks to pelias/api#1344 we hopefully now have a definitive list of countries where the housenumber comes after the street name. This commit updates our acceptance tests accordingly
update the country-code array to cover more country codes where the label format is "{{street}} {{housenumber}}".
sourced from the ID Editor config: https://github.com/openstreetmap/iD/blob/master/data/address-formats.json
resolves #1343