Index: openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 4 Jun 2007 12:29:49 -0000 1.14
+++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 11 Jun 2007 22:04:51 -0000 1.15
@@ -39,16 +39,27 @@
set ::xo::acs_lang_url [apm_package_url_from_key acs-lang]admin
- proc localize text {
+ proc localize {text {inline 0}} {
+ #ns_log notice "--local $text $inline"
if {![my exists __localizer]} {
my set __localizer [list]
}
if {[string first \x002 $text] == -1} {
return $text
} else {
set return_text ""
+ if {$inline} {
+ # Attempt to move all message keys outside of tags
+ while { [regsub -all {(<[^>]*)(\x002\(\x001[^\x001]*\x001\)\x002)([^>]*>)} $text {\2\1\3} text] } {}
+
+ # Attempt to move all message keys outside of statements
+ regsub -all -nocase {(]*>)} $text {\2\1\3} text
+
+ while { [regsub -all -nocase {(