Bug 349151 - Spell-Check No longer working
Summary: Spell-Check No longer working
Status: RESOLVED FIXED
Alias: None
Product: frameworks-sonnet
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-14 14:37 UTC by Marco Parillo
Modified: 2016-11-03 16:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output from CMake (16.85 KB, text/plain)
2015-09-17 14:45 UTC, Marco Parillo
Details
CMake Error Log (394 bytes, text/plain)
2015-09-17 14:46 UTC, Marco Parillo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Parillo 2015-06-14 14:37:07 UTC
The auto-spell-check stopped working for me on konversation Version 1.6 Using KDE Frameworks 5.9.0

Reproducible: Always

Steps to Reproduce:
1. Right-click on Input Line
2. Ensure Auto-Spell-Check is Selected
3. Confirm language (in my case American English (United States))

Actual Results:  
I can enter garbage like sekgjaorgkjagoij and I do not see the red underscore

Expected Results:  
I should see the red underscore. I know I did earlier (but I am sorry, I do not know the versions)

Running Kubuntu Wily Daily Build with all updates applied.
Comment 1 Eike Hein 2015-06-15 12:07:45 UTC
No changes on the Konversation side, reassigning to Sonnet.
Comment 2 Marco Parillo 2015-06-15 12:22:32 UTC
Other Information:
I can get UK English Spelling Checking from System Settings > Regional Settings > Spell Check and changing from US English to American English (United States) [GB], applying and re-starting konversation.
However, when I try to go back to System Settings > Regional Settings > Spell Check to re-set back to US English, that option is now missing entirely.
Comment 3 Eike Hein 2015-06-15 12:23:19 UTC
I'd suggest installing aspell-en or so.
Comment 4 Marco Parillo 2015-06-16 01:54:33 UTC
(In reply to Eike Hein from comment #3)
> I'd suggest installing aspell-en or so.

I think I have it installed:
apt-cache policy aspell-en
aspell-en:
  Installed: 7.1-0-1.1
  Candidate: 7.1-0-1.1
  Version table:
 *** 7.1-0-1.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main i386 Packages
        100 /var/lib/dpkg/status
Comment 5 Jesse Jaara 2015-07-06 18:12:52 UTC
I can confirm this bug.

Reproducing steps:
1. Open ~/.config/KDE/Sonnet.conf
2. Set defaultLangauge to an invalid value

Setting 'defaultLangauge' in "~/.config/KDE/Sonnet.conf" to an invalid value
(language with no dictionarys available) breaks the red line. Changing the language
on runtime does not help, if a valid dictionary is selected at runtime suggestions
come in as expected, but red line does not appear.
Comment 6 Jesse Jaara 2015-07-06 18:14:40 UTC
Problem is present at git-HEAD.
Comment 7 Nick Shaforostoff 2015-09-15 00:22:26 UTC
can you retry after installing hunspell-en-us ?
Comment 8 Marco Parillo 2015-09-15 09:42:35 UTC
(In reply to Nick Shaforostoff from comment #7)
> can you retry after installing hunspell-en-us ?

It is already installed:
apt-cache policy hunspell-en-us
hunspell-en-us:
  Installed: 20070829-6ubuntu2
  Candidate: 20070829-6ubuntu2
  Version table:
 *** 20070829-6ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main i386 Packages
        100 /var/lib/dpkg/status
Comment 9 Nick Shaforostoff 2015-09-15 10:22:08 UTC
in vanilla ode the hunspell plugin was looking in /usr/share/myspell/dicts for dictionaries, but at least in debian and ubuntu they are installed into /usr/share/hunspell. so i have added this path alternative to git HEAD: 
https://projects.kde.org/projects/frameworks/sonnet/repository/revisions/master/entry/src/plugins/hunspell/hunspellclient.cpp  (see in the bottom)

maybe with that it will start working?

also, can you specify the last version of konversation + KF/kdelibs where spellcheck was working for you?
Comment 10 Rex Dieter 2015-09-15 12:44:44 UTC
For what it's worth, fedora/redhat uses (just) /usr/share/myspell , so I ended up using:
http://pkgs.fedoraproject.org/cgit/kf5-sonnet.git/tree/sonnet-5.10.0-myspell_path.patch

Does *anyone* still use /usr/share/myspell/dicts ?  (if not, maybe that one can be dropped and replaced with /usr/share/myspell)

Too bad hunspell seems to have no api to query for dictionary paths :(
Comment 11 Nick Shaforostoff 2015-09-15 13:41:24 UTC
ok, I will adapt sonnet code to /usr/share/myspell as well later this evening. also i'm thinking about a CMake test to set up the directory which sonnet should check first in order to minimize disk queries on application startup...
Comment 12 Nick Shaforostoff 2015-09-15 22:25:19 UTC
Git commit 0e6edac621fbd366b126ebd851fbea21355e02d0 by Nick Shaforostoff.
Committed on 15/09/2015 at 22:25.
Pushed by shaforo into branch 'master'.

CHANGELOG: look for dicts in /usr/share/hunspell by default, this is a hunspell plugin, right?

CHANGELOG: add compile-time check to use /usr/share/myspell if /usr/share/hunspell doesn't exist
CHANGELOG: fix Highlighter::setCurrentLanguage() for the case when previous language was invalid

note: i had spellcheck broken on my machine because i had installed myspell-ru which uses KOI8-R encoding,
while hunspell-ru uses UTF-8 as expected

M  +7    -12   src/core/loader.cpp
M  +6    -0    src/plugins/hunspell/CMakeLists.txt
M  +7    -11   src/plugins/hunspell/hunspellclient.cpp
M  +4    -9    src/plugins/hunspell/hunspelldict.cpp
M  +13   -5    src/plugins/hunspell/hunspelldict.h
M  +4    -3    src/ui/highlighter.cpp

http://commits.kde.org/sonnet/0e6edac621fbd366b126ebd851fbea21355e02d0
Comment 13 Nick Shaforostoff 2015-09-16 11:11:18 UTC
Marco, can you test the change? if you need assistance with building and installing sonnet i'm ready to help you
Comment 14 Marco Parillo 2015-09-16 14:29:01 UTC
(In reply to Nick Shaforostoff from comment #13)
> Marco, can you test the change? if you need assistance with building and
> installing sonnet i'm ready to help you

I know I can install a .deb, but I do not know how to create one.
Do I need to:
1: Extract the source, and I assume place it in a temporary directory (Is there some kind of git command)?
2: Compile the source (Is there a make, and how do I invoke it)?
3: Create the package (Is that a debbuild, or something like that?)
4: Install the package (I can do that, assuming the .deb resolves any dependencies)
Comment 15 Nick Shaforostoff 2015-09-17 10:17:03 UTC
sudo apt-get install cmake libkf5sonnet-dev git
git clone git://anongit.kde.org/sonnet
mkdir sonnet/build
cd sonnet/build
cmake ..
#here check for errors and install missing -dev packages if needed
make
sudo cp ./src/plugins/hunspell/hunspell.so /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/sonnet/hunspell.so

after that you can return to original state by issuing
apt-get install --reinstall sonnet-plugins
Comment 16 Marco Parillo 2015-09-17 14:45:25 UTC
Created attachment 94612 [details]
Output from CMake
Comment 17 Marco Parillo 2015-09-17 14:46:51 UTC
Created attachment 94613 [details]
CMake Error Log
Comment 18 Marco Parillo 2016-01-07 22:38:25 UTC
This appears to be resolved with the daily builds of Kubuntu 16.04 after upgrading Plasma to 5.5.3 and Qt to 5.5.1.