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 -N -r1.284.2.117 -r1.284.2.118 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 6 Sep 2020 18:06:24 -0000 1.284.2.117 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 6 Sep 2020 18:51:01 -0000 1.284.2.118 @@ -53,7 +53,6 @@ {readonly} locale - {language_specific false} default object slot @@ -674,22 +673,13 @@ return 0 } - FormField instproc convert_to_external {value} { - ${:object} get_property -localized ${:language_specific} -name ${:name} -default $value + FormField instproc convert_to_internal {} { + # To be overloaded. } - FormField instproc convert_to_internal {} { - # Do not apply any possible conversion to the name: this is a - # delicate property with many technical implications. Furthermore, - # name validation happens before this conversion is executed, and - # it has the side-effect of adding the eventual language prefix to - # the name value and store it on the Page object. Such side-effect - # is not reflected on the value of the FormField, and calling - # set_property now would override it, preventing pages from - # receiving their language prefix. - if {${:name} ne "_name"} { - return [${:object} set_property -new 1 -localized ${:language_specific} ${:name} ${:value}] - } + FormField instproc convert_to_external {value} { + # To be overloaded. + return $value } FormField instproc process_correct_when_modifier {} { 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 -N -r1.542.2.84 -r1.542.2.85 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 6 Sep 2020 18:06:24 -0000 1.542.2.84 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 6 Sep 2020 18:51:01 -0000 1.542.2.85 @@ -4593,44 +4593,27 @@ } FormPage ad_instproc property { - {-localized false} name {default ""} } { Retrieve a FormPage property. - @param localized boolean flag telling that value should be passed - through localization @param name property name. Names starting with _ refer to object's members, rather than instance attributes. @param default fallback value when property is not set. } { - set value $default if {[regexp {^_([^_].*)$} $name _ varname]} { if {[info exists :$varname]} { - set value [set :$varname] + return [set :$varname] } } elseif {[dict exists ${:instance_attributes} $name]} { - set value [dict get ${:instance_attributes} $name] + return [dict get ${:instance_attributes} $name] } - - if {$localized} { - set locale [${:package_id} default_locale] - set value [lang::util::localize $value $locale] - } - - return $value + return $default } - FormPage instproc build_property_message_key_name { - name - } { - return xowiki-${:item_id}-property-${name} - } - FormPage ad_instproc set_property { {-new 0} - {-localized false} name value } { @@ -4639,25 +4622,13 @@ @param new boolean flag telling if the property is new. Setting a value on a non-existing property without specifying this flag will result in an error. - @param localized boolean flag telling that provided value should - automatically be converted to a message key @param name property name. Names starting with _ indicate an object variable rather than a property stored in instance_attributes @param value property value @return value (eventually converted to a has-notation message key) } { - if {$localized} { - if {![regexp [lang::util::message_key_regexp] $value]} { - set value [lang::util::convert_to_i18n \ - -locale [${:package_id} default_locale] \ - -object_id ${:item_id} \ - -message_key [:build_property_message_key_name $name] \ - -text $value] - } - } - if {[string match "_*" $name]} { set key [string range $name 1 end] @@ -4681,7 +4652,6 @@ FormPage ad_instproc get_property { -source -name:required - {-localized false} {-default ""} } { Retrieves a FormPage property @@ -4694,7 +4664,7 @@ } else { set page [:resolve_included_page_name $source] } - return [$page property -localized $localized $name $default] + return [$page property $name $default] } FormPage instproc lappend_property {name value} {