Open Bug 1373286 Opened 8 years ago Updated 3 years ago

Preferences search should not distinguish curly from single quotes

Categories

(Firefox :: Settings UI, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: theo, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: nightly-community, Whiteboard: [photon-preference])

We are using tons of curly quotes in French translations, but most users will input single quotes. Searching for "Barre d’adresse" (address bar) won’t return any result while searching for "Barre d'adresse" will work. We should treat both type of quotes the same way. The issue could be reproduced in English too, but it’s less relevant since quotes are barely used in feature names.
> Searching for "Barre d’adresse" (address bar) won’t return any result while searching for "Barre d'adresse" will work. Gah, the other way around: Searching for "Barre d'adresse" with a single quote won’t return any result while searching for "Barre d’adresse" with a curly quote will work.
Whiteboard: [photon-preference][triage]
this is a nice-to-have for current project scope, set it as P3, will come back once UX has better plan.
Priority: -- → P3
Whiteboard: [photon-preference][triage] → [photon-preference]
Theo, I was in the room when we concluded that this is just a nice-to-have, but I tend to think this is a very nice-to-have if it disproprotionally impacts users of some languages. Does it? Besides quotes I would like to look for a more general solution, like passing through the string with Unicode normalization and match the normalized forms instead. I am not aware if Unicode normalization is easily accessible in chrome JS though.
Ni for the question above.
Flags: needinfo?(theo)
I've just found https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize but it would take some investigation to tell if UNF helps the quote case here.
At first glance, those are the French terms I assume are most likely to be entered and contain a quote: page d’accueil (home page) barre d’adresse (address bar) conserver l’historique (remember history) Nom de l’appareil (device name) It could be worse. I can’t speak for other languages, but it’s definitely used in several of them: https://en.wikipedia.org/wiki/Apostrophe#Non-English_use CCing flod in case he feels we should ask localizers
Flags: needinfo?(theo)
On one side I expect people to search for short words or fragments of nouns, but I think it should be something more than nice-to-have. Note that the find bar in Firefox already does that: ’ and ' are equivalent when searching text in a page, while they are different if you select the Match Case checkbox (one of the most confusing behaviors ever). All that to say that there might be something useful in the code.
There is the function doing the actual find in page http://searchfox.org/mozilla-central/source/toolkit/components/find/nsFind.cpp#935 . It does char-by-char matching. The same feature was implemented in bug 276757. I don't think it's feasible to hook preferences find with these functions as it would likely be a full rewrite of the feature ... so we should probably duplicate it's behavior here by implementing our own matching/string filter function.
Priority: P3 → P5

With unchecked "Match diacritics" also these characters should be treated as the same:
a) ' ’ ′
b) - (U+002D) ‑ (U+2011) ‒ (U+2012) – (U+2013) — (U+2014), ― (U+2015) − (U+2212)
c) " and other double quotes characters and ″ (U+2033).

This should word in preferences and also on web page (Ctrl+F field).

If "match diacritics" is enabled, these characters should be checked strictly.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.