Bug 128514

Summary: kspell configuration dialog in kcontrol misses dictionaries in dictinary list
Product: [Unmaintained] kdelibs Reporter: Allis <allista>
Component: kspellAssignee: Zack Rusin <zack>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Allis 2006-06-02 19:15:48 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages
OS:                Linux

The problem is:
After some manipulations with packages on my system i've noticed, that dictionary list in kspell config dialog contains only default dictionaries for each of installed spellcheckers. I've search in bugtrackers and the net alot and found, similar bugs... fixed ones =) But thouse fixes didn't help me, so, having them in mind, i started to search the kde sources...
Luckily, I found the problem and even temporarily solved it, but i think it should be solved in the sources.
So, that is what i found:

<from kdelibs-3.5.2 package. file -- configure.in>
   aspell_datadir="/usr/lib/aspell"
   if test -f "/usr/bin/pspell-config"; then
      aspell_datadir=`/usr/bin/pspell-config --pkgdatadir` <<<THIS IS WRONG
   fi

And that is what </usr/bin/pspell-config --pkgdatadir> returns:
/usr/share/aspell

All is right, it IS aspell datadir, but later, in <kdelibs/kdeui/ksconfig.cpp> this <aspell_datadir> variable is used as directory to search for dictionaries. And this is WRONG, because aspell dictionaries are in </usr/lib/aspell>. If you reffer to the aspell config file (or it's builtin default configuration), you'll notice, that there is two directory options: <dict-dir> and <data-dir>. Evidently, you need the first one, not the second.

Solution:
The "trick" is: you need to use <aspell> with <config [option]> command instead of <pspell-config>

<in kdelibs package. file -- configure.in>
   aspell_datadir="/usr/lib/aspell"
   if test -f "/usr/bin/aspell"; then
      aspell_datadir=`/usr/bin/aspell config dict-dir` <<<THIS IS RIGHT
   fi
Comment 1 Thomas McGuire 2007-07-12 23:47:38 UTC

*** This bug has been marked as a duplicate of 128485 ***