Index: openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 22 Oct 2003 16:37:54 -0000 1.7 +++ openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 23 Oct 2003 10:52:06 -0000 1.8 @@ -175,9 +175,11 @@ close $f set lines [split $text "\n"] - - set dictionaryfile [file join [acs_package_root_dir acs-templating] resources forms ispell-words] + # Support for local, localized, dictionaries (UI to add to them is not implemented yet!) + set suffix [ad_decode $language "" "" "-$language"] + set dictionaryfile [file join [acs_package_root_dir acs-templating] resources forms webspell-local-dict$suffix] + # The webspell wrapper is necessary because ispell requires # the HOME environment set, and setting env(HOME) doesn't appear # to work from AOLserver. @@ -192,8 +194,12 @@ set language "--lang=$language" } - set ispell_proc [open "|$spelling_wrapper $tmpfile $dictionaryfile $spellchecker_path [ns_info home] $language" r] - + if { [catch { set ispell_proc [open "|$spelling_wrapper [ns_info home] $spellchecker_path $language $dictionaryfile $tmpfile" r] } errmsg] } { + ad_return_error "Webspell could not be executed" "Spell-checking is enabled but the spell-check wrapper ([acs_root_dir]/bin/webspell) could not be executed. Check that the wrapper exists, and that its permissions are correct.

Here is the error message:

$errmsg
" + ad_script_abort + } + + # read will occasionally error out with "interrupted system call", # so retry a few times in the hopes that it will go away. set try 0 @@ -204,8 +210,8 @@ ns_log Notice "spellchecker had a problem: $errmsg" } - if { [catch [close $ispell_proc] errmsg] } { - ad_return_error "No Dictionary Found" "Spell-checking is enabled but the spell-check program could not be executed. Check the permissions on the spell-check program (_server_root_/bin/webspell).

Here is the error message:

$errmsg
" + if { [catch { close $ispell_proc } errmsg] } { + ad_return_error "No dictionary found" "Spell-checking is enabled but the spell-check dictionary could not be reached. Check that the dictionary exists, and that its permissions are correct.

Here is the error message:

$errmsg
" ad_script_abort }