The Turkish alphabet has two different "i" characters: "i" (uppercase: İ)" and "ı" (uppercase: I). Pontoon fails to differantiate these in search. For example, when searching for "yer imleri", results with "Yer İmleri" aren't returned. https://pontoon.mozilla.org/tr/firefox-aurora/all-resources/?search=Yer+İmleri https://pontoon.mozilla.org/tr/firefox-aurora/all-resources/?search=yer+imleri More info on Wikipedia: https://en.wikipedia.org/wiki/Dotted_and_dotless_I
This might be related to postgres behind the scenes, there are a few hits on google on that, but old ones. Some indicate that icontains isn't as good as full-text search, so maybe https://docs.djangoproject.com/en/1.10/ref/contrib/postgres/search/ is a good answer.
I can confirm that Pontoon use a simple __contains which maps to the 'LIKE' in postgresql. Currently We're working on improving the speed of the search queries, I can look if any of my work will resolve your issue.
Reference PR: https://github.com/mozilla/pontoon/pull/554/commits
After some digging I found two following links: https://www.postgresql.org/message-id/Pine.LNX.email@example.com http://stackoverflow.com/questions/13029824/postgres-upper-function-on-turkish-character-does-not-return-expected-result I looked at the code to verify it and Pontoon uses icontains which translates into 'LIKE UPPER('%query%')' and that may be the reason. I'll try to look into that to estimate if it's a quick fix.
Selim, could you have a look at the proposed fix and see if it works OK? https://aaaaaaaasaaaaaa.herokuapp.com/tr/pontoon-intro/all-resources/ It might take a minute to load the page for the first time. To add translation, you can log in: username: firstname.lastname@example.org password: supersecretpassword
(In reply to Matjaz Horvat [:mathjazz] from comment #5) > Selim, could you have a look at the proposed fix and see if it works OK? > https://aaaaaaaasaaaaaa.herokuapp.com/tr/pontoon-intro/all-resources/ Yes, I can confirm that it works properly.
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/e0008021536eae30df8eb3ed54ab671fdbdc58e5 Fix bug 1346180. Set database collation for search queries. (#588)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.