-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve search for languages with accents #10567
Comments
Diacritic-insensitive search was implemented in #8242. You may manually provide diacritic-folded synonyms, as I’ve continued to do in Vietnamese. However, the results you’re seeing have a different cause: the word “pétanque” is such a small part of the overall preset name “Terrain de boules (Pétanque, Bocce…)” that other, shorter presets have a much shorter edit distance. If you search for “boules petanque” or even “petanque b”, this preset appears on top. iD doesn’t expect a preset name to contain a gloss with a list of synonyms. The synonym string in your screenshot should also contain “pétanque” in the list, since iD boosts exact matches. Also note the instructions for the “Boules/Bocce Court” string:
So you can also add “Pétanque” and “Bocce” on a separate lines in the same string to ensure that iD will find and prioritize these search terms. #6139 remains open for labeling the preset with the matching synonym instead of the main preset name. |
Okay, thanks for the explanation.
and remove "Terrain de" from the synonym string, so only |
Yes, I think it’s worth a try. If I’m reading the code correctly, it’ll consider the aliases when matching; all that’s missing is showing the alias as the search result. You can also remove the diacritic-folded synonyms. I left them in the Vietnamese localization essentially to opt out of iD’s built-in diacritic folding. But Vietnamese and French are polar opposites regarding the importance of diacritical marks in search. |
I think this will be solved by adding the respective aliases (and/or search terms) in transifex. Let's close this for now and see if that fixes it (feel free to reopen if the issue persists). |
How can I test this now? I updated on transifex and build iD from source but it didn't pull the latest translation. |
Testing such changes is not super easy, as the translation files for the presets live in a separate repository (https://github.com/openstreetmap/id-tagging-schema) and are only updated for each new release. That said, I just tested your changes locally and it seems to work fine now: It will be available for everyone with the upcoming release in a couple of days. |
Description
Currently if a word is written with accents in Transifex, the user must include the accents to find it.
I know I could just add a synonym without accents, but that’s redundant. There are probably hundreds of missing synonyms like that.
The word should be written only once with the correct accents, and the search function should ignore them.
Screenshots
example with French (fr):
The text was updated successfully, but these errors were encountered: