Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.109 -r1.110 --- openacs-4/packages/xowiki/xowiki.info 2 Feb 2009 23:34:58 -0000 1.109 +++ openacs-4/packages/xowiki/xowiki.info 10 Feb 2009 18:58:51 -0000 1.110 @@ -10,11 +10,11 @@ t xowiki - + Gustaf Neumann A more generic xotcl-based wikis example with object types and subtypes based on the content repository (with category support) - 2009-02-03 + 2009-02-10 Gustaf Neumann, WU Wien <pre> XoWiki is a Wiki implementation for OpenACS in XOTcl. Instead of @@ -56,7 +56,7 @@ BSD-Style 0 - + Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.129 -r1.130 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 7 Feb 2009 20:34:47 -0000 1.129 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 10 Feb 2009 18:58:51 -0000 1.130 @@ -1781,7 +1781,10 @@ } CompoundField instproc set_compound_value {value} { - array set {} $value + if {[catch {array set {} $value} errorMsg]} { + # this branch could be taken, when the field was retyped + ns_log notice "CompoundField: error during setting compound value with $value: $errorMsg" + } # set the value parts for each components foreach c [my components] { # Set only those parts, for which attribute values pairs are Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.330 -r1.331 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 9 Feb 2009 20:29:22 -0000 1.330 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 10 Feb 2009 18:58:51 -0000 1.331 @@ -571,6 +571,14 @@ # If we import from an old database without page_order, provide a # default value if {![my exists page_order]} {my set page_order ""} + # Check, if nls_language and lang are aligned. + if {[regexp {^(..):} [my name] _ lang]} { + if {[string range [my nls_language] 0 1] ne $lang} { + set old_nls_language [my nls_language] + my nls_language [my get_nls_language_from_lang $lang] + ns_log notice "nls_language for item [my name] set from $old_nls_language to [my nls_language]" + } + } # in the general case, no more actions required } @@ -831,6 +839,20 @@ Page instproc lang {} { return [string range [my nls_language] 0 1] } + + Page instproc get_nls_language_from_lang {lang} { + # Return the first nls_language matching the provided lang + # prefix. This method is not precise (when e.g. two nls_languages + # are defined with the same lang), but the only thing relvant is + # the lang anyhow. If nothing matches return empty. + foreach nls_language [lang::system::get_locales] { + if {[string range $nls_language] eq $lang} { + return $nls_language + } + } + return "" + } + Page instproc build_name {{-nls_language ""}} { # # Build the name of the page, based on the provided nls_language