Index: openacs-4/packages/acs-lang/www/admin/edit-description.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/edit-description.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-lang/www/admin/edit-description.tcl 14 Aug 2003 16:06:20 -0000 1.1 +++ openacs-4/packages/acs-lang/www/admin/edit-description.tcl 15 Aug 2003 07:50:44 -0000 1.2 @@ -25,7 +25,6 @@ $page_title] - ad_form -name description -form { {locale:text(hidden)} {package_key:text(hidden)} @@ -40,7 +39,7 @@ {label "Description"} {html { rows 15 cols 60 }} } - {message:text(inform) + {org_message:text(inform) {label "$default_locale_label Message"} } Index: openacs-4/packages/acs-lang/www/admin/edit-description.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/edit-description.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-lang/www/admin/edit-description.xql 14 Aug 2003 16:06:20 -0000 1.1 +++ openacs-4/packages/acs-lang/www/admin/edit-description.xql 15 Aug 2003 07:50:44 -0000 1.2 @@ -3,15 +3,15 @@ - select lm.message as message, - lmk.description - from lang_message_keys lmk, - lang_messages lm - where lmk.package_key = lm.package_key - and lmk.message_key = lm.message_key - and lm.package_key= :package_key - and lm.message_key = :message_key - and locale = :locale + select lmk.description, + (select lm.message as message + from lang_messages lm + where lm.package_key= :package_key + and lm.message_key = :message_key + and locale = :default_locale) as org_message + from lang_message_keys lmk + where lmk.package_key = :package_key + and lmk.message_key = :message_key Index: openacs-4/packages/acs-lang/www/admin/locale-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/locale-delete.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-lang/www/admin/locale-delete.adp 14 Aug 2003 16:06:20 -0000 1.7 +++ openacs-4/packages/acs-lang/www/admin/locale-delete.adp 15 Aug 2003 07:50:44 -0000 1.8 @@ -1,5 +1,5 @@ - Delete locale + @page_title@ @context;noquote@

Index: openacs-4/packages/acs-lang/www/admin/message-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-delete.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/www/admin/message-delete.adp 15 Aug 2003 07:50:44 -0000 1.1 @@ -0,0 +1,17 @@ + + @page_title@ + @context;noquote@ + +

+ +

+ Deleting message @package_key@.@message_key@ +

+ +
+@form_export_vars;noquote@ + +
+ + + Index: openacs-4/packages/acs-lang/www/admin/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-delete.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/www/admin/message-delete.tcl 15 Aug 2003 07:50:44 -0000 1.1 @@ -0,0 +1,59 @@ +ad_page_contract { + + Delete a message + + @author Lars Pind (lars@collaboraid.biz) + + @creation-date 2003-08-15 + @cvs-id $Id: message-delete.tcl,v 1.1 2003/08/15 07:50:44 lars Exp $ + +} { + locale + package_key + message_key + show:optional + confirm_p:optional +} + + +# We rename to avoid conflict in queries +set current_locale $locale +set default_locale en_US + +set locale_label [ad_locale_get_label $current_locale] +set default_locale_label [ad_locale_get_label $default_locale] + +set page_title "Delete Message" +set context [list [list "package-list?[export_vars { locale }]" $locale_label] \ + [list "message-list?[export_vars { locale package_key show }]" $package_key] \ + $page_title] + + +# We check that this request is coming for the system wide default +# locale. If not, we can't allow the creation of a new localized +# message. + +if { ![string equal $current_locale $default_locale] } { + ad_return_error "Can only create messages in the default locale" "Can only create messages in the default locale" + ad_script_abort +} + + +set form_export_vars [export_vars -form { locale package_key message_key show {confirm_p 1} }] + + +if { [exists_and_not_null confirm_p] && [template::util::is_true $confirm_p] } { + + db_transaction { + + db_dml delete_messages { delete from lang_messages where package_key = :package_key and message_key = :message_key } + + db_dml delete_audit { delete from lang_messages_audit where package_key = :package_key and message_key = :message_key } + + db_dml delete_message_key { delete from lang_message_keys where package_key = :package_key and message_key = :message_key } + + } + + ad_returnredirect "message-list?[export_vars { locale package_key show }]" + ad_script_abort +} Index: openacs-4/packages/acs-lang/www/admin/message-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-list.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-lang/www/admin/message-list.adp 14 Aug 2003 16:06:20 -0000 1.1 +++ openacs-4/packages/acs-lang/www/admin/message-list.adp 15 Aug 2003 07:50:44 -0000 1.2 @@ -36,6 +36,9 @@ @locale_label@ Message + + + @@ -52,6 +55,11 @@ Not translated + + + + + Index: openacs-4/packages/acs-lang/www/admin/message-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-list.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-lang/www/admin/message-list.tcl 14 Aug 2003 16:06:20 -0000 1.1 +++ openacs-4/packages/acs-lang/www/admin/message-list.tcl 15 Aug 2003 07:50:44 -0000 1.2 @@ -87,9 +87,11 @@ db_multirow -extend { edit_url + delete_url message_key_pretty } messages select_messages {} { set edit_url "edit-localized-message?[export_vars { locale package_key message_key show {return_url {[ad_return_url]}} }]" + set delete_url "message-delete?[export_vars { locale package_key message_key show {return_url {[ad_return_url]}} }]" set message_key_pretty "$package_key.$message_key" } Index: openacs-4/packages/acs-lang/www/admin/message-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-search.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-lang/www/admin/message-search.adp 14 Aug 2003 16:06:20 -0000 1.2 +++ openacs-4/packages/acs-lang/www/admin/message-search.adp 15 Aug 2003 07:50:44 -0000 1.3 @@ -4,7 +4,7 @@ search.q -Search for +Search for Index: openacs-4/packages/acs-lang/www/admin/package-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/package-list.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-lang/www/admin/package-list.adp 14 Aug 2003 16:06:20 -0000 1.1 +++ openacs-4/packages/acs-lang/www/admin/package-list.adp 15 Aug 2003 07:50:44 -0000 1.2 @@ -3,7 +3,7 @@ @context;noquote@ -Search for +Search for