Firefox accepts dictionaries and spell check entries from every which spell check backend, leaving problems with defaults and the language selector enables this behavior

Bug #1026869 reported by Roman
52
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Hunspell
New
Undecided
Unassigned
Mozilla Firefox
New
Unknown
myspell
New
Undecided
Unassigned
firefox (Ubuntu)
Confirmed
Undecided
Unassigned
language-selector (Ubuntu)
Triaged
Low
Unassigned

Bug Description

I've been searching for the solution to this bug for a long time.

Firefox's spell-check, despite my locale being en-US, sets itself to en-GB, en-ZA or something en_US, which isn't even correct.

The problem, it seems, is that Firefox uses whatever spell-checking backends you have installed - aspell, myspell, and hunspell. The result is that Firefox chooses, en-GB as the default spell checker more-often than not. So I uninstalled myspell, hunspell, and a package called firefox-locale-en and now everything is correct - only one spell checker is installed in Firefox.

The language selector, however, always prompts to reinstall these backends whenever it is loaded.

This Firefox add-on can assist, it gives you a list of dictionaries installed: https://addons.mozilla.org/en-US/firefox/addon/dictionary-switcher/

Roman (thezub)
description: updated
Revision history for this message
In , Roman-verzub (roman-verzub) wrote :

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713224758

Steps to reproduce:

Installed GNU/Linux, specifically Ubuntu, and used their language-selector" which installed backends for spellchecking including hunspell and myspell.

Actual results:

Firefox, accepting spellcheck backends from aspell, myspell, and hunspell gave me numerous spell-check options, the default almost-always being the wrong one.

Expected results:

Firefox should stick with one spell-check backend (I recommend aspell) and perhaps recommend it for packagers as a dependency. This is the launchpad bug: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1026869

Revision history for this message
Roman (thezub) wrote :

Added upstream bug url

Changed in firefox:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
In , Roman-verzub (roman-verzub) wrote :

I forgot to mention that I also installed firefox-locale-en which adds the seemingly-incorrect en_US (en-US is correct).

Changed in firefox:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Deletesoftware+moz (deletesoftware+moz) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Danny Howard (dannyman) wrote :

Build identifier: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

Every week or so, I have to right-click in a text box and switch the spell checker from British English to American English. My system (kubuntu) locale settings are set to American English. I can not fathom how, where, or why Firefox keeps switching me to British English.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in language-selector (Ubuntu):
status: New → Confirmed
affects: language-selector → language-selector (Ubuntu)
Changed in language-selector (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Davidovitch (david-verelst) wrote :

I think this happens when you do not have any dictionary installed as a Firefox plugin. When I was only relying on the system wide spell checker (hunspell in my case) the default language selection of the spell checker always was always wrong (notice that now you do not have dictionary tab in the add-on settings page). Since I write in Dutch, French, Danish and English, this was a real pain. When I installed one dictionary as a Firefox plugin, the default language selection worked as expected.

For the record, this is also mentioned on StackExchange (http://stackoverflow.com/questions/26936792/change-firefox-spell-check-default-language/29446115, http://stackoverflow.com/questions/21542515/change-default-language-on-firefox/29446353, http://askubuntu.com/questions/50049/how-to-use-american-english-spelling-dictionary-in-firefox), and the Arch Linux Wiki (https://wiki.archlinux.org/index.php/Firefox#Firefox_doesn.27t_remember_default_spell_check_language).

Revision history for this message
Reuben Thomas (rrt) wrote :

This bug continues to affect Firefox 40 in Ubuntu.

I can confirm the workaround of installing a dictionary *in Firefox* for the desired default language.

Revision history for this message
Reuben Thomas (rrt) wrote :

In fact, the situation appears to be more complicated, and points to a race condition of some sort.

Having fixed the problem, I thought I'd try a theory about what causes it. So, I removed the dictionary and restarted Firefox. However, my spelling language was still correctly set to en-GB.

Further, I can no longer reproduce the problem in a fresh profile, which of course does not have the dictionary installed.

I should stress that the only thing I changed in any of this was my Firefox profile; I did not add, remove or otherwise alter any Ubuntu package.

Hence, I really can't see what could have fixed the problem (since it has gone from being reproducible with a fresh profile to not being reproducible with a fresh profile), and I wonder whether there may be a race condition; not least, because the code that scans for dictionaries runs asynchronously.

Changed in firefox:
status: New → Unknown
Changed in firefox:
status: Unknown → New
Revision history for this message
Timur Tabi (timur-tabi) wrote :

I have installed the en-us language pack in Firefox, and I've tried many of the "fixes" I found on the Internet, but this problem remains for me. For instance, "honor" is flagged but "honour" is not flagged. The "English (US) Language Pack" add-on is installed.

One interesting observation: when I go under Preferences->Language, I see that en-us is selected as the default. When I click on Set Alternatives, but the drop-down also shows en-gb and en-ca. I can click on Canada and UK and remove them, and they show as removed. However, after I restart, those two languages come back. So there appears to be no way to actually remove those languages.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Timur: Does it make a difference if you go to /usr/share/hunspell and brutally remove the en_CA and en_GB dicts?

Revision history for this message
Timur Tabi (timur-tabi) wrote :

Yes, that fixes it! I did this:

sudo apt-get remove hunspell-en-au hunspell-en-gb hunspell-en-za

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, removing the packages works too. One thing that will happen is that if you open Language Support, it will prompt you to install those packages (which you can choose not to, of course). OTOH, I suppose you don't have a reason to open Language Support very often.

Changed in firefox:
importance: Medium → Unknown
Revision history for this message
Lukas Märdian (slyon) wrote :

I see we have an easy workaround for language-selector available in comment #14, so I'm setting the priority to "Low".

Changed in language-selector (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.