Index: openacs-4/packages/acs-templating/tcl/parse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/parse-procs.tcl,v diff -u -r1.45 -r1.46 --- openacs-4/packages/acs-templating/tcl/parse-procs.tcl 9 Jan 2010 01:56:09 -0000 1.45 +++ openacs-4/packages/acs-templating/tcl/parse-procs.tcl 18 Nov 2012 18:47:20 -0000 1.46 @@ -508,7 +508,7 @@ } { variable parse_list # initialize the compiled code - set parse_list [list "set __adp_output \"\""] + set parse_list [list "set __adp_output {}; set __ad_conn_locale \[ad_conn locale\]"] switch -exact -- $source_type { -file { set chunk [template::util::read_file $source] } @@ -542,7 +542,7 @@ # Since messages may read the variables of the adp page they go trough # expand_percentage_signs which amongst other things does an uplevel subst - while {[regsub -all {([^\\])\#([-a-zA-Z0-9_:\.]+)\#} $code {\1[template::expand_percentage_signs [lang::message::lookup [ad_conn locale] {\2} {TRANSLATION MISSING} {} -1]]} code]} {} + while {[regsub -all {([^\\])\#([-a-zA-Z0-9_:\.]+)\#} $code {\1[template::expand_percentage_signs [lang::message::lookup $__ad_conn_locale {\2} {TRANSLATION MISSING} {} -1]]} code]} {} # We do each substitution set in two pieces, separately for normal # variables and for variables with ";noquote" attached to them. 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.19 -r1.20 --- openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 22 Jan 2010 14:10:30 -0000 1.19 +++ openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 18 Nov 2012 18:47:20 -0000 1.20 @@ -202,6 +202,10 @@ set spellchecker_path [nsv_get spellchecker path] + # + # Force default language to en_US + #set ::env(LANG) en_US.UTF-8 + # the --lang switch only works with aspell and if it is not present # aspell's (or ispell's) default language will have to do. set lang_and_enc "--encoding=utf-8" Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 21 Dec 2008 17:28:52 -0000 1.33 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 18 Nov 2012 18:47:20 -0000 1.34 @@ -51,7 +51,7 @@ if {[template::util::is_true $slave_properties_p]} { template::adp_append_code " foreach {__key __value} \$__args { - if {!\[string equal \$__key __adp_slave\]} { + if {\$__key ne \"__adp_slave\"} { set __adp_properties(\$__key) \"\$__value\" } } @@ -122,7 +122,7 @@ # (We do catch it, but then we re-throw it) template::adp_append_code "if { \[catch { append __adp_output \[$command\] } errmsg\] } {" template::adp_append_code " global errorInfo errorCode" - template::adp_append_code " if { \[string equal \[lindex \$errorCode 0\] \"AD\"\] && \[string equal \[lindex \$errorCode 1\] \"EXCEPTION\"\] && \[string equal \[lindex \$errorCode 2\] \"ad_script_abort\"\] } {" + template::adp_append_code " if { \[lindex \$errorCode 0\] eq \"AD\" && \[lindex \$errorCode 1\] eq \"EXCEPTION\" && \[lindex \$errorCode 2\] eq \"ad_script_abort\" } {" template::adp_append_code " ad_script_abort" template::adp_append_code " } else {" template::adp_append_code " append __adp_output \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\"" @@ -284,8 +284,8 @@ if { \$$i >= \${$name:rowcount} } { set ${name}(groupnum_last_p) 1 } else { - upvar 0 ${name}:\[expr \$$i + 1\] $name:next - set ${name}(groupnum_last_p) \[expr !\[string equal \[set \"${name}:next(${column})\"\] \$${name}($column)\]\] + upvar 0 ${name}:\[expr {\$$i + 1}\] $name:next + set ${name}(groupnum_last_p) \[expr {\${${name}:next(${column})} ne \$${name}($column)}\] } " @@ -297,8 +297,8 @@ if { \$$i >= \${$name:rowcount} } { break } - upvar 0 ${name}:\[expr \$$i + 1\] $name:next - if { !\[string equal \[set \"${name}:next(${column})\"\] \$${name}(${column})\] } { + upvar 0 ${name}:\[expr {\$$i + 1}\] $name:next + if { \${${name}:next($column)} ne \$${name}(${column}) } { break } " @@ -668,7 +668,7 @@ template::adp_append_code " append __adp_output \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\"" template::adp_append_code " ns_log Error \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\n\$errorInfo\"" template::adp_append_code "} else {" - template::adp_append_code "if { !\[string equal \[string trim \[lindex \$__adp_include_optional_output end\]\] \"\"] } {" + template::adp_append_code "if { \[string trim \[lindex \$__adp_include_optional_output end\]\] ne {} } {" template::adp_compile_chunk $chunk Index: openacs-4/packages/acs-templating/tcl/tag-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-templating/tcl/tag-procs.tcl 10 Jan 2007 21:22:12 -0000 1.15 +++ openacs-4/packages/acs-templating/tcl/tag-procs.tcl 18 Nov 2012 18:47:20 -0000 1.16 @@ -134,11 +134,11 @@ set next [expr {$i + 1}] } eq { - append condition "\[string equal $arg1 \"[lindex $args $i]\"\]" + append condition "$arg1 eq \"[lindex $args $i]\"" set next [expr {$i + 1}] } ne { - append condition "! \[string equal $arg1 \"[lindex $args $i]\"\]" + append condition "$arg1 ne \"[lindex $args $i]\"" set next [expr {$i + 1}] } @@ -158,7 +158,7 @@ nil { if { [string first @ $arg1] == -1 } { # We're assuming this is a static string, not a variable - append condition "\[empty_string_p $arg1\]" + append condition "$arg1 eq {}" } else { # substitute array variables if {! ( [regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg1 {\1(\2)} arg1]