GNOME Bugzilla – Bug 637021
Enable WebKitGTK+ spell-checking
Last modified: 2011-05-24 11:13:33 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.
Created attachment 176235 [details] [review] ephy-spell-check: remove unused files WebKitGTK+ implements this for us. Bug #637021
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
(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.
Review of attachment 176235 [details] [review]: r=me
I don't think we need a UI preference for the spell checking. It should just work.
Comment on attachment 176235 [details] [review] ephy-spell-check: remove unused files Attachment 176235 [details] pushed as bcaf548 - ephy-spell-check: remove unused files
*** Bug 604850 has been marked as a duplicate of this bug. ***
(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).
(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 :)
(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.
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.
*** Bug 501876 has been marked as a duplicate of this bug. ***
*** Bug 523868 has been marked as a duplicate of this bug. ***
(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 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.
Closing.