Index: openacs-4/etc/install/tcl/acs-lang-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/tcl/acs-lang-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/etc/install/tcl/acs-lang-procs.tcl 21 Oct 2003 15:06:15 -0000 1.1 +++ openacs-4/etc/install/tcl/acs-lang-procs.tcl 22 Oct 2003 09:51:55 -0000 1.2 @@ -6,19 +6,24 @@ namespace eval ::twt::acs_lang {} -ad_proc ::twt::acs_lang::load_i18n_messages {} { - Enables all locales and loads all message catalogs. +ad_proc ::twt::acs_lang::load_i18n_messages { + {-locales ""} } { + Enables all locales, or a given list of locales, and + loads all message catalogs for those locales. +} { + if { [empty_string_p $locales] } { + set locales [::twt::oacs_eval {db_list all_locales {select locale from ad_locales}}] + } + # First enable all locales - ::twt::oacs_eval { - set all_locales [db_list all_locales {select locale from ad_locales}] - - foreach locale $all_locales { - lang::system::locale_set_enabled -locale $locale -enabled_p t + ::twt::oacs_eval " + foreach locale {$locales} { + lang::system::locale_set_enabled -locale \$locale -enabled_p t } - } + " - # Load all catalog files (also imports en_US, but never mind) + # Load all catalog files for enabled locales ::twt::oacs_eval lang::catalog::import } Index: openacs-4/etc/install/tcl/twt-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/tcl/twt-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/etc/install/tcl/twt-procs.tcl 21 Oct 2003 15:06:15 -0000 1.4 +++ openacs-4/etc/install/tcl/twt-procs.tcl 22 Oct 2003 09:51:55 -0000 1.5 @@ -214,7 +214,6 @@ form widget (workaround since I can only get tclwebtest to select based on label). } { - # Get the label from the value array set current_field [field current] set field_choices $current_field(choices) set index 0 Index: openacs-4/etc/install/tcl/user-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/tcl/user-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/etc/install/tcl/user-procs.tcl 12 Oct 2003 08:31:28 -0000 1.5 +++ openacs-4/etc/install/tcl/user-procs.tcl 22 Oct 2003 09:51:55 -0000 1.6 @@ -92,14 +92,12 @@ form submit form find ~n add_user - field find ~n "id" - field select $type - - # FIXME: TclWebTest chooses option based on label rather than value - # Full Access or Limited Access - field select $full_access - # Yes or No - field select $guest + field find ~n type + ::twt::multiple_select_value $type + field find ~n can_browse_p + ::twt::multiple_select_value $full_access + field find ~n read_private_data_p + ::twt::multiple_select_value $guest form submit } @@ -125,33 +123,13 @@ # Allow commenting of lines with hash if { ![regexp {\#.+} "[string trim [lindex $fields_list 0]]" match] } { - - # FIXME: TclWebTest chooses option based on label rather than value - # This is a workaround that converts values to labels - if { [string trim [lindex $fields_list 5]] == "1" } { - set full_access "Full Access" - } else { - set full_access "Limited Access" - } - if { [string trim [lindex $fields_list 6]] == "t" } { - set guest "Yes" - } else { - set guest "No" - } - set type [string trim [lindex $fields_list 4]] - if { $type == "admin" } { - set type "Staff" - } - - lappend return_list [list \ - [string trim [lindex $fields_list 0]] \ - [string trim [lindex $fields_list 1]] \ - [string trim [lindex $fields_list 2]] \ - [string trim [lindex $fields_list 3]] \ - $type \ - $full_access \ - $guest] + # Get the first 6 items without leading/trailing space + set trimmed_list [list] + foreach item [lrange $fields_list 0 6] { + lappend trimmed_list [string trim $item] + } + lappend return_list $trimmed_list } }