Index: openacs-4/packages/ams/tcl/address-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/address-widget-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ams/tcl/address-widget-procs.tcl 21 May 2005 21:50:16 -0000 1.5 +++ openacs-4/packages/ams/tcl/address-widget-procs.tcl 7 Jun 2005 10:59:58 -0000 1.6 @@ -98,39 +98,23 @@ # There is no HTTP connection - resort to system locale set locale [lang::system::locale] } - return [util_memoize [list template::util::address::country_options_not_cached -locale $locale]] +# return [util_memoize [list template::util::address::country_options_not_cached -locale $locale]] + return [template::util::address::country_options_not_cached] } ad_proc -public template::util::address::country_options_not_cached { {-locale "en_US"} } { Returns the country list. } { - set country_list [db_list_of_lists get_countries {}] + set country_code_list [db_list get_country_codes {}] set return_country_list [list] set reserved_country_codes [parameter::get_from_package_key -parameter "DefaultISOCountryCode" -package_key "ams" -default ""] - foreach country $country_list { - set this_locale $locale - set country_name_db [lindex $country 0] - set country_code_db [lindex $country 1] - set package_key "ams" - set message_key "country_${country_code_db}" - set key "${package_key}.${message_key}" - if { [string is false [lang::message::message_exists_p $locale $key]] } { - if { [string is false [lang::message::message_exists_p "en_US" $key]] } { - lang::message::register $locale $package_key $message_key $country_name_db - } else { - set this_locale "en_US" - } + foreach country $country_code_list { + if { [lsearch $reserved_country_codes $country] < 0 } { + lappend return_country_list [list [lang::util::localize "#ref-countries.${country}#"] $country] } - # mgeddert customization for mbbs - if { [lsearch $reserved_country_codes $country_code_db] < 0 } { - # the reason not to use the "list" command here is because a curly bracket - # needs to be used in the list for countries with a single word name - # so that alphabetizing (via lsort) works later on in this proc - lappend return_country_list "{[lang::message::lookup $this_locale $key]} {$country_code_db}" - } } set country_code [list] if { [exists_and_not_null reserved_country_codes] } {