Ticket #1483960 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 12 days ago

SpellChecker: Pspell Option?

Reported by: brashquido Owned by: thomasb
Priority: 5 Milestone: 0.2-beta
Component: PHP backend Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

Using Beta 2 and think it is great. I really like the SpellChecker? option but would like to be able to configure it to use the PHP Pspell function instead of having to connect to an external service such as Google. This should speed up spellchecking considerably, especially in environments where bandwidth to the Internet is limited. It also gives options to situations where privacy/security comes into play, as some places I do work for won't allow e-mail content to be spellchecked by an external service due to confidentiality. Great work overall though. I'm yet to demo RoundCube to anyone who is not inpressed by its slick interface.

Attachments

pspell.patch (7.7 kB) - added by ksteinhoff 3 weeks ago.

Change History

Changed 2 years ago by thomasb

  • milestone changed from 0.1-rc1 to later

Changed 12 months ago by Harold

Since Firefox 2.0+ supports spell checking on the client, I'd vote for not to include spell checking in the RoundCube backend...

Changed 12 months ago by jpingle

If security and having it be local are the only reasons, You can also setup a NOX Spell Server (http://orangoo.com/labs/GoogieSpell/Download/Nox%20Spell%20Server/) and then point your config to it like this:

$rcmail_config['spellcheck_uri'] = '127.0.0.1:14003/?lang=';

Even so, it would be nice to have a pure-PHP solution. Not everyone is lucky enough to have a pure-Firefox userbase. :/

Changed 12 months ago by till

  • status changed from new to closed
  • resolution set to wontfix

If you want a pure PHP solution (I yet have to see a good reason), just port NoxSpell. Or write your own server from scratch.

For the moment though, I don't see this being a Roundcube issue, nor a valid feature request. We have hooks in place, it's up to someone else to contribute.

Changed 12 months ago by thomasb

  • status changed from closed to reopened
  • resolution deleted
  • severity changed from normal to minor

Since Pspell is quite common, I'd leave this open with a low priority. Also TinyMCE comes up with some Pspell bindings which could propabyl adapted.

Changed 4 weeks ago by dan

seems as though TinyMCE has a standard plugin for spelling that supports

* pspell

* aspell

* google spell checker

http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker located in /program/js/tiny_mce/plugins/spellchecker/

Changed 4 weeks ago by dan

though rough hacks i've got the Pspell working in html edit mode steps for the crude test:

1. download http://tinymce.moxiecode.com/download.php tinymce_spellchecker_php_2_0_2.zip
2. unpack in the directory /program/js/tiny_mce/plugins/spellchecker
3. edit ./program/js/tiny_mce/plugins/spellchecker/config.php to use engine 'Pspell'
4. install the php5-pspell and aspell dictionaries

5. apply a patch like

--- program/js/editor.js        (revision 1597)
+++ program/js/editor.js        (working copy)
@@ -15,6 +15,7 @@

 // Initialize the message editor

+//function rcmail_editor_init(skin_path, editor_lang, spellcheck_languages)
 function rcmail_editor_init(skin_path, editor_lang)
   {
   tinyMCE.init({ mode : "textareas",
@@ -23,12 +24,13 @@
                  apply_source_formatting : true,
                  theme : "advanced",
                  language : editor_lang,
-                 plugins : "emotions,media,nonbreaking,table,searchreplace,visualchars,directionality",
-                 theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator,undo,redo,image,media,ltr,rtl",
+                 plugins : "emotions,media,nonbreaking,table,searchreplace,visualchars,directionality,spellchecker",
+                 theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator,undo,redo,image,media,ltr,rtl,spellchecker",
                  theme_advanced_buttons2 : "",
                  theme_advanced_buttons3 : "",
                  theme_advanced_toolbar_location : "top",
                  theme_advanced_toolbar_align : "left",
+                 spellchecker_languages : "+English=en,Swedish=sv",
                  extended_valid_elements : "font[face|size|color|style],span[id|class|align|style]",
                  content_css : skin_path + "/editor_content.css",
                  external_image_list_url : "editor_images.js"


change to html edit mode when writing a new email and there will be a working spell icon.
If you have safemode problem the ./classes/PSpell.php has to have safe mode permissions to the dictionary. All pspell error occur in dialog boxes so its pretty easy to diagnose problems.

Question really is what is an acceptable patch? non-exclusive options:

1. replace the current googie implementation with TinyMCE's API to google?

1a. Is there value supporting googie and the TinyMCE google access?

2. Use the TRUE/FALSE value of 'enable_spellcheck' configuration options still apply to the google spell checker add a 'PSpell' value to make it do PSpelling

4. Is having a large spell button still needed. Is having the link for spelling above the text pane needed?

5. Is there value supporting PSpellShell?

Changed 3 weeks ago by ksteinhoff

  • owner set to ksteinhoff
  • status changed from reopened to new
  • severity changed from minor to normal
  • milestone changed from later to 0.2-beta

Changed 3 weeks ago by ksteinhoff

  • version changed from 0.1-beta2 to svn-trunk

Changed 3 weeks ago by ksteinhoff

Changed 3 weeks ago by ksteinhoff

My patch (pspell.patch) implements Pspell for the plain text spell checker.

It adds a configuration option ('spellcheck_engine').

In this patch, the contents of spell.inc have been moved to spell_googie.inc, and spell_pspell.inc has been add. spell.inc invokes googie or pspell, depending on the configurations option.

Using pspell requires the Pspell extension for PHP.

Changed 2 weeks ago by till

  • owner changed from ksteinhoff to till
  • status changed from new to assigned

I am very much in favour of spinning off the translation stuff into "drivers".

Thanks for the patch Kris!

Changed 2 weeks ago by thomasb

Patch committed to trunk in r1649.

Now we still need to fix the html mode...

Changed 13 days ago by thomasb

  • owner changed from till to thomasb
  • status changed from assigned to new

OK, I'll take care of the html editor...

Changed 13 days ago by thomasb

  • status changed from new to assigned

Changed 13 days ago by thomasb

  • status changed from assigned to closed
  • resolution set to fixed

tinyMCE spellchecker fixed in r1651

Changed 12 days ago by dan

thankyou, very much appreciated thomasb, Kris and till. This works for me and well done on the depth of integration keeping roundcube configation consistant with tinymce.

Note: See TracTickets for help on using tickets.