Regression: spellchecker cannot load external dictionaries provided by distribution anymore
Categories
(Core :: Spelling checker, defect)
Tracking
()
People
(Reporter: olivier, Unassigned)
References
(Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/77.0.3865.90 Chrome/77.0.3865.90 Safari/537.36
Steps to reproduce:
This bug was initially reported against the thunderbird 68.1.1 package in Ubuntu (https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1847247).
Thunderbird 68 is not able to make use of external hunspell dictionaries provided by the distribution in /usr/lib/thunderbird/dictionaries.
Actual results:
This is a regression compared to thunderbird 60.9.0 and earlier, which locates and uses hunspell dictionaries installed in /usr/lib/thunderbird/dictionaries.
As far as I can tell, other distributions (such as Fedora 30) are similarly affected.
Expected results:
It looks like https://hg.mozilla.org/mozilla-unified/rev/8810007550b1fdeeae0f5d797c4a511818a57be7 is the revision that removed this ability. The tracking bug with the rationale is https://bugzilla.mozilla.org/show_bug.cgi?id=1457321, but it doesn't mention anywhere the way Linux distributions install external hunspell dictionaries and make them available to thunderbird. I wonder whether this was an oversight, or whether that use case was indeed considered but deemed unimportant when compared to the performance improvements that this change brought.
Either way, would it be possible to consider adding back the ability to load external dictionaries from the file system, maybe behind a setting that would be off by default?
Reporter | ||
Comment 1•6 years ago
|
||
@kmag @ehsan @aswan: can you please comment on the above request?
At the moment I'm holding back on updating the Ubuntu packages to version 68 in stable Ubuntu releases (it's only available in version 19.10 that was released yesterday) because from a user perspective this is a regression.
Comment 2•6 years ago
|
||
Hi Olivier,
Thanks for the bug report. It has been a while since that patch was landed so my memory may be a bit rusty, but I don't believe we considered the use case of Linux distributions side-loading dictionaries in this way...
Would it be a useful work-around to convert these dictionaries to the WebExtension dictionary format? I haven't tested this myself, but at least in Firefox it is possible to side-load extensions, so perhaps installing such extensions to a location like /usr/lib/thunderbird/extensions/{uuid}
may be a useful workaround?
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Yes, we considered it. That directory was never intended for third-party use. If you want to install distribution dictionaries specifically for Thunderbird, you need to bundle them as extensions.
Reporter | ||
Comment 4•6 years ago
|
||
Thanks for the feedback.
Having /usr/lib/thunderbird/dictionaries be a symlink to /usr/share/hunspell was an elegant way to reuse dictionaries installed system-wide instead of re-packaging them specifically for thunderbird.
It's a bit of a shame to loose this functionality, but I understand this wasn't designed specifically with this in mind anyway.
I'll experiment with a distro patch to restore this functionality, and if I come up with something that works and that's not too ugly I'll share it here.
Until then stable releases of Ubuntu are stuck with thunderbird 60.9.0.
Comment 5•6 years ago
|
||
If you want Thunderbird to use system Hunspell dictionaries, you can set the DICPATH
environment variable to point to the system dictionary directory. I'm not particularly happy with that arrangement given how expensive scanning and loading dictionary directories at startup, but I recognize how convenient it is, so I've left that functionality in place.
Reporter | ||
Comment 6•6 years ago
|
||
Setting DICPATH
to /usr/share/hunspell
works indeed, thanks for the tip Kris.
I understand the startup performance concern, but I think the trade off is worth it, at least for users of the Ubuntu packages who are used to having access to system dictionaries without the need to install additional extensions.
Reporter | ||
Comment 7•6 years ago
|
||
Given that there is indeed a way to load external dictionaries (the DICPATH
environment variable), I'm closing this bug.
Thanks Kris and Ehsan for your help.
I am running vanilla Firefox 78.3.0 ESR under Linux and neither $DICPATH nor the spellchecker.dictionary_path preference is working (also not working in Firefox 68ESR). I have a customized medical dictionary that I have used for many years under older versions of Firefox that I now cannot use. I assume it is supposed to be as simple as:
$ ls /opt/dictionary
$ file *
en-US.aff: ASCII text
en-US.dic: UTF-8 Unicode text
$ export DICPATH="/opt/dictionary"
$ firefox
Yet it is not using the external dictionary I defined (showing words in that external dictionary as misspelled, still). I tried also adding export DICTIONARY="en-US" before launching and that didn't help. I am hoping someone might have some idea what is going on. Is this option now broken? And I using it wrong? I would open a new bug report if I were confident I am not doing something wrong, myself. Thanks
Reporter | ||
Comment 9•5 years ago
|
||
@crxssi: I suggest opening a new bug report. The issue discussed here was closed as resolved, it would be better to start a new conversation in a separate bug report.
Comment 10•5 years ago
|
||
Thanks
Created new bug 1674520
Updated•3 years ago
|
Description
•