Bug 433154 - Sonnet tries to load some Hebrew dictionary on an English-only system
Summary: Sonnet tries to load some Hebrew dictionary on an English-only system
Status: REPORTED
Alias: None
Product: frameworks-sonnet
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-18 11:04 UTC by Dan Dascalescu
Modified: 2022-05-16 11:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2021-02-18 11:04:56 UTC
SUMMARY
My locale is US English, and when I launch Kompare, I see this in the console:

$ kompare files1.lst files2.lst 
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed

ADDITIONAL INFORMATION
Since I don't use any other locales, I have used Bleachbit to delete >300MB of bloat locales that came preinstalled with KDE neon 5.21. That might have triggered the bug.
Comment 1 Dan Dascalescu 2021-02-18 11:05:57 UTC
Forgot to add the step that triggers the message: check "Show Text View" from Settings.
Comment 2 Canoe 2021-02-18 14:31:05 UTC
(In reply to Dan Dascalescu from comment #0)
> SUMMARY
> My locale is US English, and when I launch Kompare, I see this in the
> console:
> 
> $ kompare files1.lst files2.lst 
> Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
> kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
> 
> ADDITIONAL INFORMATION
> Since I don't use any other locales, I have used Bleachbit to delete >300MB
> of bloat locales that came preinstalled with KDE neon 5.21. That might have
> triggered the bug.

Can you check than you have hunspell-he installed : 
https://archlinux.org/packages/extra/x86_64/hunspell-he/
Comment 3 Canoe 2021-02-18 14:33:07 UTC
(In reply to Canoe from comment #2)
> (In reply to Dan Dascalescu from comment #0)
> > SUMMARY
> > My locale is US English, and when I launch Kompare, I see this in the
> > console:
> > 
> > $ kompare files1.lst files2.lst 
> > Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
> > kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
> > 
> > ADDITIONAL INFORMATION
> > Since I don't use any other locales, I have used Bleachbit to delete >300MB
> > of bloat locales that came preinstalled with KDE neon 5.21. That might have
> > triggered the bug.
> 
> Can you check than you have hunspell-he installed : 
> https://archlinux.org/packages/extra/x86_64/hunspell-he/

(In reply to Dan Dascalescu from comment #0)
> SUMMARY
> My locale is US English, and when I launch Kompare, I see this in the
> console:
> 
> $ kompare files1.lst files2.lst 
> Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
> kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
> 
> ADDITIONAL INFORMATION
> Since I don't use any other locales, I have used Bleachbit to delete >300MB
> of bloat locales that came preinstalled with KDE neon 5.21. That might have
> triggered the bug.

(In reply to Canoe from comment #2)
> (In reply to Dan Dascalescu from comment #0)
> > SUMMARY
> > My locale is US English, and when I launch Kompare, I see this in the
> > console:
> > 
> > $ kompare files1.lst files2.lst 
> > Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
> > kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
> > 
> > ADDITIONAL INFORMATION
> > Since I don't use any other locales, I have used Bleachbit to delete >300MB
> > of bloat locales that came preinstalled with KDE neon 5.21. That might have
> > triggered the bug.
> 
> Can you check than you have hunspell-he installed : 
> https://archlinux.org/packages/extra/x86_64/hunspell-he/

Apologies I've misread your post. Can you check that you have the appropriate hunspell package for your language/locale installed. I've had the same issue of it defaulting to Hebrew when there are no other language packages installed.
Comment 4 Kevin Kofler 2021-02-18 14:58:18 UTC
Note that Hspell is not the same as Hunspell, it is a different spellchecker, for Hebrew only. Also note that Hunspell also supports Hebrew, among many other languages. (I do not know whether there are any advantages of Hspell nor what they are. In Fedora, we build Sonnet with Hunspell only, so this cannot happen there. The Aspell and Hspell backends are basically superseded by Hunspell. Only Voikko actually provides support for a language with no decent support in Hunspell, namely Finnish.)

I suppose that what happens is that, if the Hunspell backend does not find any dictionary to use, Sonnet falls back to the next backend (and possibly the same for Aspell if it is installed). That ends up being Hspell, and since Hspell is Hebrew-only, the supported locale is hardcoded. That results in this warning.

There is not really anything Kompare can do about this. I am reassigning this to Sonnet and leaving it to the Sonnet developers whether they want (and are able) to do anything about this or whether they want to close it as an upstream (Hspell) issue, a downstream (Neon) packaging issue, a user error, or intentional behavior (not a bug).
Comment 5 Dan Dascalescu 2021-02-19 00:13:55 UTC
@Canoe: not sure if this helps in light of Kevin's message, but  `apt list --installed | grep huns` shows:

hunspell-en-us/focal,now 1:2018.04.16-1 all [installed,automatic]
libhunspell-1.7-0/focal,now 1.7.0-2build2 amd64 [installed,automatic]
libqt5hunspellinputmethod5/focal,now 5.15.2+dfsg-0xneon+20.04+focal+build13 amd64 [installed,automatic]