Index: openacs-4/packages/ams/tcl/ams-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-procs.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/ams/tcl/ams-procs.tcl 10 Jun 2005 21:50:53 -0000 1.14
+++ openacs-4/packages/ams/tcl/ams-procs.tcl 15 Jun 2005 22:59:04 -0000 1.15
@@ -14,6 +14,7 @@
namespace eval ams::attribute {}
namespace eval ams::option {}
namespace eval ams::ad_form {}
+namespace eval ams::util {}
ad_proc -public attribute::pretty_name {
{-attribute_id:required}
@@ -67,8 +68,8 @@
@see ams::attribute::new
} {
- set pretty_name [lang::util::convert_to_i18n -message_key "${object_type}_${attribute_name}" -text "$pretty_name"]
- set pretty_plural [lang::util::convert_to_i18n -message_key "${object_type}_${attribute_name}" -text "$pretty_plural"]
+ set pretty_name [lang::util::convert_to_i18n -message_key "${object_type}_${attribute_name}_pretty_name" -text "$pretty_name"]
+ set pretty_plural [lang::util::convert_to_i18n -message_key "${object_type}_${attribute_name}_pretty_plural" -text "$pretty_plural"]
if { $if_does_not_exist_p } {
set attribute_id [attribute::id -object_type $object_type -attribute_name $attribute_name]
@@ -100,6 +101,20 @@
return [ad_conn package_id]
}
+ad_proc -public ams::util::edit_lang_key_url {
+ -message:required
+ {-package_key "ams"}
+} {
+
+} {
+ if { [regsub "^${package_key}." [string trim $message "\#"] {} message_key] } {
+ set edit_url [export_vars -base "[apm_package_url_from_key "acs-lang"]admin/edit-localized-message" { { locale {[ad_conn locale]} } package_key message_key { return_url [ad_return_url] } }]
+ } else {
+ set edit_url ""
+ }
+ return $edit_url
+}
+
ad_proc -public ams::object_parents {
-object_type:required
-sql:boolean
Index: openacs-4/packages/ams/www/attribute.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/attribute.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/ams/www/attribute.adp 28 May 2005 15:37:27 -0000 1.3
+++ openacs-4/packages/ams/www/attribute.adp 15 Jun 2005 22:59:04 -0000 1.4
@@ -3,8 +3,8 @@
#ams.Pretty_Name# @pretty_name@
-#ams.Pretty_Plural# @pretty_plural@
+#ams.Pretty_Name# @attribute_info.pretty_name@
#ams.Pretty_Plural# @attribute_info.pretty_plural@
#ams.Widget# @attribute_info.widget@
Index: openacs-4/packages/ams/www/attribute.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/attribute.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ams/www/attribute.tcl 7 Jun 2005 11:22:46 -0000 1.5 +++ openacs-4/packages/ams/www/attribute.tcl 15 Jun 2005 22:59:04 -0000 1.6 @@ -14,11 +14,12 @@ acs_object_type::get -object_type $attribute_info(object_type) -array "object_info" -set pretty_name $attribute_info(pretty_name) -set pretty_plural $attribute_info(pretty_plural) -set title $pretty_name +set pretty_name_url [ams::util::edit_lang_key_url -message $attribute_info(pretty_name)] +set pretty_plural_url [ams::util::edit_lang_key_url -message $attribute_info(pretty_plural)] +set title $attribute_info(pretty_name) set context [list [list objects Objects] [list "object?object_type=$attribute_info(object_type)" $object_info(pretty_name)] $title] + list::create \ -name options \ -multirow options \ @@ -59,6 +60,7 @@ actions { label "" display_template { +