Skip to content
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

In zh displaying the local order should be from bigger place to smaller place #6269

Closed
Supaplextw opened this issue Apr 30, 2019 · 7 comments
Assignees
Labels
localization Adapting iD across languages, regions, and cultures
Milestone

Comments

@Supaplextw
Copy link
Contributor

As title, In zh, zh-tw, zh-hk lang setting, when you upload your changeset, the message says that thank for your contribution, the order of place should be from bigger place to smaller place, like country, city, district, suburban. In the current setting, the grammar is wrong in Chinese.

@bhousel bhousel added the localization Adapting iD across languages, regions, and cultures label Apr 30, 2019
@quincylvania
Copy link
Collaborator

@Supaplextw Is there a way to change the grammar of the offending strings on the zh localizations instead?

@bhousel
Copy link
Member

bhousel commented Apr 30, 2019

I think we are just pulling it from nominatim but I will check if we can improve it.. (this morning I started searching for an old issue maybe related to this and got sidetracked)

@quincylvania
Copy link
Collaborator

quincylvania commented Apr 30, 2019

Oh I misunderstood the issue. I thought it meant the community index entries should be reversed based on the phrasing of the message, but I guess it's that the place order of the geocoded part of the message needs reversing.

@bhousel
Copy link
Member

bhousel commented May 1, 2019

I think we are just pulling it from nominatim but I will check if we can improve it.. (this morning I started searching for an old issue maybe related to this and got sidetracked)

oh I was wrong, it's just this code here - we can localize it with a translation string probably:

iD/modules/modes/save.js

Lines 482 to 489 in d026f2f

var parts = [];
var addr = result.address;
var city = addr && (addr.town || addr.city || addr.county);
if (city) parts.push(city);
var region = addr && (addr.state || addr.country);
if (region) parts.push(region);
_location = parts.join(', ');

@1ec5
Copy link
Collaborator

1ec5 commented May 1, 2019

Also, the components would normally be joined together, not separated by a comma or space. This might get a little weird if one of the components isn’t in Chinese characters, though. As far as I can tell, Japanese and Korean follow the same convention as Chinese (but Korean uses spaces).

@bhousel bhousel self-assigned this May 1, 2019
@bhousel bhousel closed this as completed in 8f9dc7a May 4, 2019
@bhousel
Copy link
Member

bhousel commented May 4, 2019

Thanks for you feedback @Supaplextw & @1ec5 👍
We support more localization options now:

    thank_you_location: "Thank you for improving the map around {where}."
    thank_you_where:
      format: "{place}{separator}{region}"
      separator: ", "

Separator will only be inserted if the reverse geocode actually returns both placelike and regionlike results:

    var addr = result.address;
    var place = (addr && (addr.town || addr.city || addr.county)) || '';
    var region = (addr && (addr.state || addr.country)) || '';
    var separator = (place && region) ? t('success.thank_you_where.separator') : '';

    _location = t('success.thank_you_where.format',
        { place: place, separator: separator, region: region }
    );

@Supaplextw
Copy link
Contributor Author

Thanks for the help. Hope the next update will see a better improvement.

Supaplextw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localization Adapting iD across languages, regions, and cultures
Projects
None yet
Development

No branches or pull requests

4 participants