Closed
Bug 746148
Opened 12 years ago
Closed 12 years ago
When unable to find dictionary try also LANG variable to determine dictionary
Categories
(Core :: Spelling checker, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: jhorak, Assigned: jhorak)
Details
Attachments
(1 file, 1 obsolete file)
2.09 KB,
patch
|
ehsan.akhgari
:
review+
mfinkle
:
approval-mozilla-central+
|
Details | Diff | Splinter Review |
Mozilla tries to determine spell check dictionary by using locale. This doesn't work for Linux distributions which wants to share dictionaries across the system. In this case it picks the first available dictionary as default. Attaching patch which tries to set dictionary from LANG environment variable just before 'en-US' will be tried. Please have a look.
Assignee | ||
Updated•12 years ago
|
Attachment #615716 -
Flags: review?(ehsan)
Comment 1•12 years ago
|
||
Comment on attachment 615716 [details] [diff] [review] patch 0.1 Review of attachment 615716 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/composer/src/nsEditorSpellCheck.cpp @@ +752,5 @@ > + if (env_lang != nsnull) { > + nsString lang = NS_ConvertUTF8toUTF16(env_lang); > + // strip charset if there is any > + PRInt32 pos; > + if ( (pos = lang.FindChar('.')) != -1) { Nit: please call FindChar on the previous line, and just compare in the condition. @@ +761,2 @@ > if (NS_FAILED(rv)) { > + rv = SetCurrentDictionary(NS_LITERAL_STRING("en-US")); Why do you need to assume en-US first here?
Assignee | ||
Comment 2•12 years ago
|
||
I'm little confused here, the en-US used to be here before, I've just added LANG check before trying en-US. Or do you mean the en-US should have higher priority?
Assignee: nobody → jhorak
Attachment #615716 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #615716 -
Flags: review?(ehsan)
Attachment #616078 -
Flags: review?(ehsan)
Comment 3•12 years ago
|
||
Comment on attachment 616078 [details] [diff] [review] patch 0.2 Review of attachment 616078 [details] [diff] [review]: ----------------------------------------------------------------- No, sorry, I just read the patch incorrectly. r=me. Note for the drivers: this does not impact Fennec as spellchecking is currently disabled there.
Attachment #616078 -
Flags: review?(ehsan)
Attachment #616078 -
Flags: review+
Attachment #616078 -
Flags: approval-mozilla-central?
Updated•12 years ago
|
Attachment #616078 -
Flags: approval-mozilla-central? → approval-mozilla-central+
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6294c13ee51e Thanks for your patch!
Target Milestone: --- → mozilla14
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6294c13ee51e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•