Bug 91581 - aspell-0.60 kspell dictionary problems
Summary: aspell-0.60 kspell dictionary problems
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kspell (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Zack Rusin
URL:
Keywords:
: 97386 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-18 11:52 UTC by Kostas Petrakis
Modified: 2006-05-25 14:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
aspell-search-dir.patch (648 bytes, patch)
2004-12-12 20:14 UTC, Gregorio Guidi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostas Petrakis 2004-10-18 11:52:22 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4.2 
OS:                Linux

After upgrading to aspell-0.60 kspell seems to fail to recognize the new dictionaries, i tryed to check my dictionaries from KDE Components --> Spell Checker but there is only aspell-default available as dicitonary (allthough i have also installed the 0.60 version of the Greek dictionary).
Downgrading again to 0.50 resolves this issues and the dictionaries are again available. I haven't tryed recompiling kdelibs (ouch! i don't need this again).
Comment 1 Heiko Evermann 2004-11-11 23:44:45 UTC
KSpell comes in two flavours: kspell and kspell2. Quite a number of apps still uses kspell which does not use a proper way to find the dictionary files: it scans the first existing directory of the following list:
/usr/lib/aspell
/usr/local/lib/aspell
/usr/share/aspell
/usr/local/share/aspell

If you do a complete install of aspell-0.6, including the new dictionaries, maybe your dictionaries ended up in /usr/lib/aspell-0.6. This direcory will not be scanned.
Comment 2 Kostas Petrakis 2004-11-12 09:19:53 UTC
I just installed yesterday a fresh system with KDE 3.3.1 on a Gentoo box, i installed aspell: app-text/aspell-0.50.5-r4
But still when i select spelling from the Control center my dictionaries are listed as unknown (this happens now with aspell-0.50 as well)...
Any thoughts?
Comment 3 Kostas Petrakis 2004-11-12 09:23:44 UTC
Please ignore my last post it was my mistake.
Comment 4 Gregorio Guidi 2004-12-12 20:14:59 UTC
Created attachment 8637 [details]
aspell-search-dir.patch

Maybe this patch could be committed until kmail is properly ported to kspell2?

Note that /usr/lib/aspell-0.60 is indeed the default install dir for new
versions of aspell. Note also that usually it contains a lot of non-dictionary
files, so the combobox could be filled with "Unknown" entries.
Comment 5 Gregorio Guidi 2004-12-12 20:15:28 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 Enrico Ros 2005-01-30 10:52:57 UTC
*** Bug 97386 has been marked as a duplicate of this bug. ***
Comment 7 Enrico Ros 2005-01-30 10:59:09 UTC
Gentoo may solve this bug (but maybe not in time for 3.4 release), but KDE really needs to figure out the aspell dicts dir (see FIXME in kdelibs/kdeui/ksconfig.cpp).
In the meantime the attached patch is good to be applied (and marked as 'Gentoo fix' in code).
Comment 8 Peter Volkov 2005-01-31 18:51:34 UTC
Hello. Today I tried this patch. Seems that it works.

So there are two solutions. Symbolic link and this patch. Both solutions are bad. There are too many unknown dictionaries. Gregorio Guidi already wrote above the reasons. From the comments I know that solution to use "aspell dump" will solve this problems. But dump produces too many dictionaries!!! 25 on my system. 

So I would like ask developers about feature I see will be very handy. I would like to have the possibility to chose dictionary to be seen in drop down menu in spell checker window. For example. From kde control center I choose system dictionaries I would like to use. Then when I check spelling in kwrite application I can select in drop down menu only between dictionaries I have chosen.

This is very comfortable when I have two languages on my system. In English language where I have American, English, something about 21 English dictionaries and something about 4 Russian. But when I'm doing spell checking I have by default previously selected dictionary. So if I need to change dictionary in most cases I need something like English->Russian of Russian->English. 25 dictionaries is very unpleasant when the dictionary you need is out of scope so you need to move slider point mouse on the dictionary only because you want to change English<->Russian.

I've wrote about this feature here because I think fixing of this bug can be very near to my feature request.Or should I open another bug/feature request?
Comment 9 Zack Rusin 2005-01-31 19:03:36 UTC
Just so that we're clear KSpell2 implements detecting of ASpell dictionaries correctly, the reason you don't see it is that whatever app you have there hasn't been ported to KSpell2 yet. Feature requests on KSpell1 will be automatically closed because it's deprecated. I'll commit the attached patch for now but the real solution is to port applications to KSpell2.
Comment 10 Zack Rusin 2005-01-31 19:07:56 UTC
CVS commit by zrusin: 

Enrico Ros rosenric at dei,unipd,it patch for aspell dictionary detection.
BUG: 91581


  M +5 -3      ksconfig.cpp   1.89


--- kdelibs/kdeui/ksconfig.cpp  #1.88:1.89
@@ -497,4 +497,6 @@ void KSpellConfig::getAvailDictsAspell (
   QFileInfo dir ("/usr/lib/aspell");
   if (!dir.exists() || !dir.isDir())
+    dir.setFile ("/usr/lib/aspell-0.60");
+  if (!dir.exists() || !dir.isDir())
     dir.setFile ("/usr/local/lib/aspell");
   if (!dir.exists() || !dir.isDir())


Comment 11 Peter Volkov 2005-01-31 20:09:20 UTC
I am sorry, but I don't understand. How can I check what I am using: kspell or kspell2?

Now I just noted that not all applications can see new dictionaries after appling this patch, so I think this is kspell kspell2 issue.

After applying this patch I can see many broken dictionaries in spellchecking dialog of kwrite or kmail. So I think this is kspell. But I just noted that in Control Center->kde components->spellchecking I can see no dictionaries at all, exept default. So if this is kspell2 then it is not working on my system at all. Also in konqueror, right click on the text I am now writing and choosing check spelling there invokes dialog window. I can see only default dictionary there. Is this kspell2 also?

BTW. Symlink adds many dictionaries in kspell2(?). Also many unknown dictionaries are there. So it seems that if this is kspell2 then it is not working with aspell-0.60.


Now about my feature request. I want to chose existing normal dictionaries. Look. I only installed dictionaries for two languages English and Russian. And what I have? 25 dictionaries:
peter@camobap ~ $ aspell dump dicts | wc -l
25

So I would like to have possibility to chose dictionaries I am using in control panel, and not to see other dictionaries or aliases in spell checking dialog when changing dictionary.