-
Notifications
You must be signed in to change notification settings - Fork 32
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
Set default preferred_place based on locale strings with localities #89
Comments
So I guess the idea here would be to modify |
I started investigating this issue and I have a few concerns:
Is |
Generally yes, especially for countries. You can see this using the old Rails-based JSON endpoints, e.g. https://www.inaturalist.org/places/russia.json, where the
IMO, since this is a pretty quick lookup and we're not planning on using it for search, I would fetch it out of the database. If that becomes a performance problem, we could add it to elasticsearch later. @pleary do you have an opinion on this? |
I’ve noticed that
In test db and in rails code it doesn’t contain id of the current record, only the id of the parent record; id of the current record is pushed to
Should I consider that |
Weird, that's probably a problem with the fixture, so yes, assume the |
Set preferredPlace based on locality from locale. Implements #89
One unexpected consequence of this that we need to figure out is that due to the fact that we are prioritizing names in a place over names matching a locale without a place, people requesting names in Some backstory regarding our current name priority is at https://groups.google.com/u/1/g/inaturalist/c/P8iNMY0WYNM/discussion |
The local param can include a locality code in addition to the language code (e.g.
en-NZ
ores-MX
). We could lookup the iNaturalist place equivalents to the location portion of the code and use that as a default preferred_place, (e.g.en-NZ
sets a default preferred_place_id of 6803, New Zealand's iNat place_id).I suggest the order of precedence of preferred_place from least to most important:
The text was updated successfully, but these errors were encountered: