Index: openacs-4/packages/acs-subsite/tcl/group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-procs.tcl,v diff -u -r1.25.2.4 -r1.25.2.5 --- openacs-4/packages/acs-subsite/tcl/group-procs.tcl 27 Jul 2005 16:15:08 -0000 1.25.2.4 +++ openacs-4/packages/acs-subsite/tcl/group-procs.tcl 9 Sep 2005 14:19:29 -0000 1.25.2.5 @@ -109,9 +109,6 @@ if {[empty_string_p $pretty_name]} { set pretty_name $group_name } -# Commented out the following as convert_to_i18n was only approved for -# 5.3 in acs-lang due to dependency on acs-translations. -# set pretty_name [lang::util::convert_to_i18n -prefix "group" -text "$pretty_name"] } set group_id [package_instantiate_object \ @@ -124,6 +121,16 @@ -variable_prefix $variable_prefix \ $group_type] + # We can't change the group_name to an I18N version as this would + # break compatability with group::member_p -group_name and the + # like. So instead we change the title of the object of the group + # (through the pretty name). We just have to change the display of + # groups to the title at the appropriate places. + + if { ![empty_string_p [info procs "::lang::util::convert_to_i18n"]] } { + set pretty_name [lang::util::convert_to_i18n -message_key "group_title.${group_id}" -text "$pretty_name"] + } + # Update the title to the pretty name if {![empty_string_p $pretty_name]} { db_dml title_update "update acs_objects set title=:pretty_name where object_id = :group_id" @@ -358,9 +365,10 @@ " if {[info exists group_name]} { + set pretty_name [lang::util::convert_to_i18n -message_key "group_title.${group_id}" -text "$group_name"] db_dml update_object_title { update acs_objects - set title = :group_name + set title = :pretty_name where object_id = :group_id } }