Spell checker occasionally reverts to United States

The place to report Pale Moon specific bugs on the Windows operating system.

Moderator: satrow

xtal256
Moonbather
Moonbather
Posts: 61
Joined: 2014-06-22, 00:32
Location: here

Spell checker occasionally reverts to United States

Unread post by xtal256 » 2014-08-19, 23:27

I have installed the Australian dictionary and selected it as the spell check language, but on some occasions I notice it has reverted to US English.
Image

I cannot say for certain when it happens, although when I change it back it seems to stick until I restart the browser.

I have looked into this before, but I didn't find any answers. I have set the preference "spellchecker.dictionary" to "en-AU" (which, strangely, was "en-US" before I changed it, even when the spell checker was using AU), but that has not helped.

This is driving me crazy. If it's not going to be fixed soon, I'd like to at least know if or how I can remove the US language and just use AU.
[Window Detective] - Windows UI spy utility for programmers

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 24838
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Spell checker occasionally reverts to United States

Unread post by Moonchild » 2014-08-20, 09:59

xtal256 wrote:I cannot say for certain when it happens, although when I change it back it seems to stick until I restart the browser.
I have looked into this before, but I didn't find any answers. I have set the preference "spellchecker.dictionary" to "en-AU" (which, strangely, was "en-US" before I changed it, even when the spell checker was using AU), but that has not helped.
Thanks for reporting this. It's indeed an intermittent problem.

I looked at the code involved, and I can see where this might go wrong - the problem is that the Mozilla code for that part only uses the pref as a fallback, not as a first choice. It tries to automatically select the spellchecker dictionary based on the language set in the context or the language specified on the element. This allows people to automatically have the correct dictionary selected if they are often visiting pages in multiple languages, but obviously interferes if you want to override this.

It's a known issue in Firefox that apparently has been left to sit unattended. See bug #717433, bug #728069 and specifically comment 2 on bug #682564 for the randomness involved, especially if the same main language (en-XX).

I'll see if I can improve this code somehow, but I'll have to research where and when exactly spellchecker.dictionary is being set. Maybe I just need a new override pref to "always use the user-set value" or something.

As a workaround, delete or rename "en-US" files in the "dictionaries" folder under the Pale Moon installation folder. That should work to remove it as an option.
"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne
Image

xtal256
Moonbather
Moonbather
Posts: 61
Joined: 2014-06-22, 00:32
Location: here

Re: Spell checker occasionally reverts to United States

Unread post by xtal256 » 2014-08-21, 10:07

Moonchild wrote:It's a known issue in Firefox that apparently has been left to sit unattended.
Why does that not surprise me?

Oh well, thanks for at least looking at this, and rather quickly too. That's more than I can say about most other open-source projects.
[Window Detective] - Windows UI spy utility for programmers

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Spell checker occasionally reverts to United States

Unread post by Antonius32 » 2014-08-22, 20:17

So it's not just me.. Good to know that it's being looked into!

spiralofhope

[SOLVED] Spell checker occasionally reverts to United States

Unread post by spiralofhope » 2015-06-13, 03:19

SOLVED

TL;DR

- Pale Moon 25.5.0 (thank you!)
- British English Dictionary (Forked by Marco Pinto) 2.25
- about:config - spellchecker.dictionary.override;en_GB

Long-form solution

25.5.0 introduces the fix to this problem. Thank you!
Added a preference for always preferring a certain dictionary language.
To use this, create a new preference spellchecker.dictionary.override (string) and set it to your language code.
The british-english addon I used was British English Dictionary (Forked by Marco Pinto) 2.25

In about:config, add spellchecker.dictionary.override with the text en_GB


----

This issue still exists in vanilla Firefox:

- Bug 1073827 - Spellchecker fails to honour/remember user's choice of language/dictionary
- Bug 1073840 - Pref: Always honour setting of spellchecker language/dictionary in user prefs, regardless of lang attribute or Content-Language header

The following solution is impossible, since that directory and those files are no longer present.
delete or rename "en-US" files in the "dictionaries" folder under the Pale Moon installation folder.
.. but who cares about all that Firefox bs. Pale Moon has an actual solution.

spiralofhope

Re: Spell checker occasionally reverts to United States

Unread post by spiralofhope » 2015-06-13, 03:42

I created a screenshot walkthrough of the solution:

http://blog.spiralofhope.com/?p=6792

moderator, let me know if I shouldn't link to my blong and should instead upload the images to a third-party host and re-create the whole thing here.

BernardZ

Re: Spell checker occasionally reverts to United States

Unread post by BernardZ » 2015-06-15, 07:28

What Australian dictionary do you recommend?

Furthermore I would like a switch to go from US to Australian dictionaries and back again. The reason for this, when I am on Australian sites, I like to use Australian English and when I am on US sites, I like to use US English. I think it needs a switch as some Australian sites are hosted in the US, and some US sites are shadowed in Australia, also some sites like the Wikipedia use the local English on different pages.

lyceus
Moon Magic practitioner
Moon Magic practitioner
Posts: 2210
Joined: 2011-09-13, 23:08

Re: Spell checker occasionally reverts to United States

Unread post by lyceus » 2015-06-16, 02:38

Uh oh! It's true, even if I have the override to es_MX dictionary I am set again in English es_ES. :wtf:

Locked