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.28.2.2 -r1.28.2.3 --- openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 21 Feb 2019 16:09:00 -0000 1.28.2.2 +++ openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 1 Mar 2019 10:47:19 -0000 1.28.2.3 @@ -80,8 +80,9 @@ if { $contents eq "" } { return $values } - # if language is empty string don't spellcheck - set spellcheck_p [ad_decode [set language [ns_queryget $element(id).spellcheck]] ":nospell:" 0 "" 0 1] + # if language is empty or :nospell: string don't spellcheck + set language [ns_queryget $element(id).spellcheck] + set spellcheck_p [expr {$language ni {":nospell:" ""}}] # perform spellchecking or not? if { $spellcheck_p } { @@ -104,7 +105,7 @@ template::element::set_properties $element(form_id) $element(id) -validate [list] template::element::set_error $element(form_id) $element(id) " - [ad_decode $error_num 1 "Found one error." "Found $error_num errors."] Please correct, if necessary." + [expr {$error_num == 1 ? "Found one error." : "Found $error_num errors."}] Please correct, if necessary." # switch to display mode so we can show our inline mini-form with suggestions. template::element::set_properties $element(form_id) $element(id) mode display @@ -194,7 +195,7 @@ set lines [split $text "\n"] # Support for local, localized, dictionaries (UI to add to them is not implemented yet!) - set suffix [ad_decode $language "" "" "-$language"] + set suffix [expr {$language ne "" ? "-$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