After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637021 - Enable WebKitGTK+ spell-checking
Enable WebKitGTK+ spell-checking
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 501876 523868 604850 (view as bug list)
Depends on:
Blocks: 431002 523868
 
 
Reported: 2010-12-11 15:14 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2011-05-24 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-spell-check: remove unused files (10.30 KB, patch)
2010-12-11 15:14 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
prefs-dialog: enable WebKitGTK+'s spell checking (17.59 KB, patch)
2010-12-11 15:14 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2010-12-11 15:14:29 UTC
This patch adds spell checking to Epiphany's preferences.
The one thing missing is to fit the checkbox properly in the preferences dialog, it looks a bit clumsy right now.

Also, bonus patch to remove the old lib/ephy-spell-check stuff.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2010-12-11 15:14:31 UTC
Created attachment 176235 [details] [review]
ephy-spell-check: remove unused files

WebKitGTK+ implements this for us.

Bug #637021
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2010-12-11 15:14:35 UTC
Created attachment 176236 [details] [review]
prefs-dialog: enable WebKitGTK+'s spell checking

The new checkbox enables or disables the built in spell checking using the
preferred web languages as the dictionaries. You need aspell-$lang or whatever
your enchant library looks at.

Bug #637021
Comment 3 Reinout van Schouwen 2010-12-11 16:23:57 UTC
(In reply to comment #2)

> The new checkbox enables or disables the built in spell checking using the
> preferred web languages as the dictionaries. You need aspell-$lang or whatever
> your enchant library looks at.

Cool! 

One thing worries me a bit, though: what happens when no preferred web languages are set? Is the default system language used then? 

Could we do better by using a simple language guessing algorithm? See for instance this GPL2 guesser: http://www.mnogosearch.org/guesser/ - it works pretty well.
Comment 4 Xan Lopez 2010-12-11 16:36:13 UTC
Review of attachment 176235 [details] [review]:

r=me
Comment 5 Xan Lopez 2010-12-11 16:36:58 UTC
I don't think we need a UI preference for the spell checking. It should just work.
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2010-12-11 17:27:13 UTC
Comment on attachment 176235 [details] [review]
ephy-spell-check: remove unused files

Attachment 176235 [details] pushed as bcaf548 - ephy-spell-check: remove unused files
Comment 7 Reinout van Schouwen 2010-12-12 10:13:00 UTC
*** Bug 604850 has been marked as a duplicate of this bug. ***
Comment 8 Xan Lopez 2010-12-12 10:44:01 UTC
(In reply to comment #5)
> I don't think we need a UI preference for the spell checking. It should just
> work.

To clarify, I meant a preference to enable/disable it. I think it should be enabled by default with sane values. What might be impossible to avoid is a UI somewhere to configure the language, since sometimes you want to write in languages other than the ones you have set-up in the system (ie, I have English locale but routinely write in Spanish).
Comment 9 Xan Lopez 2010-12-12 10:44:59 UTC
(In reply to comment #3)
> (In reply to comment #2)
> 
> > The new checkbox enables or disables the built in spell checking using the
> > preferred web languages as the dictionaries. You need aspell-$lang or whatever
> > your enchant library looks at.
> 
> Cool! 
> 
> One thing worries me a bit, though: what happens when no preferred web
> languages are set? Is the default system language used then? 
> 
> Could we do better by using a simple language guessing algorithm? See for
> instance this GPL2 guesser: http://www.mnogosearch.org/guesser/ - it works
> pretty well.

I think this has to work really well for us to be able to get rid of any way of configuring the languages at all :)
Comment 10 Reinout van Schouwen 2010-12-12 16:23:13 UTC
(In reply to comment #9)

> I think this has to work really well for us to be able to get rid of any way of
> configuring the languages at all :)

It does work really well, except maybe not all languages Epiphany supports are known to the guesser (it contains 106 language "maps" so the coverage is quite big). I agree that there should still be a fallback, for which the web languages preference tab is perfectly acceptable.
Comment 11 Diego Escalante Urrelo (not reading bugmail) 2010-12-15 19:32:38 UTC
About the guesser: I feel uneasy about maintaining that much code in Epiphany :-/
There seems to be libtextcat doing this...

We have another problem with the context menu, since we are turning off the WebKit menus we have no suggestions to mispelled words or ways to ignore them. Not good!

My take right now would be to enable this by default reading from web-languages and fix the context menu thing.
Comment 12 Diego Escalante Urrelo (not reading bugmail) 2010-12-15 19:41:46 UTC
*** Bug 501876 has been marked as a duplicate of this bug. ***
Comment 13 Diego Escalante Urrelo (not reading bugmail) 2010-12-15 19:43:16 UTC
*** Bug 523868 has been marked as a duplicate of this bug. ***
Comment 14 Reinout van Schouwen 2010-12-21 00:23:42 UTC
(In reply to comment #11)

> There seems to be libtextcat doing this...

Libtextcat is old, but if it works, why not. I'm not the one to judge if this amount of code is too much to be included in Epihany core.

> My take right now would be to enable this by default reading from web-languages
> and fix the context menu thing.

AFAIK web-languages is empty by default. What language do we pick then? The current system locale?
That's a very crude heuristic.
Comment 15 Xan Lopez 2011-05-24 11:13:19 UTC
Comment on attachment 176236 [details] [review]
prefs-dialog: enable WebKitGTK+'s spell checking

I've pushed a somewhat modified version of this to master. I'm working on adding some features to the context menu of misspelled words (like dictionary suggestions) now, at least the very basic stuff is in place.
Comment 16 Xan Lopez 2011-05-24 11:13:33 UTC
Closing.