Closed Bug 1587101 Opened 10 months ago Closed 10 months ago

Regression: spellchecker cannot load external dictionaries provided by distribution anymore

Categories

(Core :: Spelling checker, defect)

68 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

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?

@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.

Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(ehsan)
Flags: needinfo?(andrew.swan)

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?

Flags: needinfo?(ehsan)
Keywords: regression
Regressed by: 1457321

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.

Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(andrew.swan)

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.

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.

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.

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.

Status: UNCONFIRMED → RESOLVED
Closed: 10 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.