Don't select random en-* dictionary when lang attribute is en, not en-US
Categories
(Core :: Spelling checker, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox85 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
Details
Attachments
(2 files)
When using <textarea lang="en">, our spell checker selects random en dictionary even if system or application is en-US locale. So if en-GB dictionary is installed in Firefox, we might select en-GB dictionary on lang=en even if Firefox is en-US package. I think we should select en-US dictionary in this situation.
So we should respect application locale and system locale for order of spellchecker.
| Assignee | ||
Comment 1•5 years ago
|
||
Actually, our locale service doesn't use UTF-16 for locale name and it will
be ASCII. Although dictionary name of spell checker is locale/language name,
it still uses UTF-16. To use locale API, I should replace it with ACString.
| Assignee | ||
Comment 2•5 years ago
|
||
When we don't match exactly dictionary name with lang attribute, we look for
language name. When looking for language name (ex. en/fr etc), we don't
consider the priority by application/system locale. So if lang=en, it may be
selected by character order. Most case is that en-GB is always selected if it
is installed.
We should respect application/system locale if language name is matched to
current content language before random selection.
Depends on D99336
| Assignee | ||
Comment 3•5 years ago
|
||
Comment 5•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/40144f211b5d
https://hg.mozilla.org/mozilla-central/rev/221fabfedacb
Description
•