Index: openacs-4/packages/contacts/www/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/message.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/www/message.tcl 18 May 2005 16:45:50 -0000 1.1 +++ openacs-4/packages/contacts/www/message.tcl 7 Jun 2005 07:45:40 -0000 1.2 @@ -14,12 +14,12 @@ } -validate { valid_message_type -requires {message_type} { if { [lsearch [list email letter label] $message_type] < 0 } { - ad_complain "Your provided an invalid Message Type" + ad_complain "[_ contacts.lt_Your_provided_an_inva]" } } valid_party_submission { if { ![exists_and_not_null party_id] && ![exists_and_not_null party_ids] } { - ad_complain "Your need to provide some contacts to send a message" + ad_complain "[_ contacts.lt_Your_need_to_provide_]" } } } @@ -33,7 +33,7 @@ set party_count [llength $party_ids] -set title "Messages" +set title "[_ contacts.Messages]" set user_id [ad_conn user_id] set context [list $title] @@ -47,13 +47,13 @@ message_id:key party_ids:text(hidden) return_url:text(hidden) - {to:text(inform),optional {label "Recipients"} {value $recipients}} + {to:text(inform),optional {label "[_ contacts.Recipients]"} {value $recipients}} } if { [string is false [exists_and_not_null message_type]] } { append form_elements { - {message_type:text(select) {label "Type"} {options {{Email email} {Letter letter} {Label label}}}} + {message_type:text(select) {label "[_ contacts.Type]"} {options {{Email email} {Letter letter} {Label label}}}} } set title [_ contacts.create_a_message] } else { @@ -66,21 +66,21 @@ if { [string is false [exists_and_not_null message]] } { append form_elements { - {message:text(select) {label "Message"} {options {{{-- Create New Message --} new}}}} + {message:text(select) {label "[_ contacts.Message]"} {options {{{-- Create New Message --} new}}}} } - set edit_buttons [list [list "Next" create]] + set edit_buttons [list [list "[_ contacts.Next]" create]] } else { append form_elements { {message:text(hidden)} } if { $message_type == "email" } { append form_elements { {subject:text(text),optional - {label "Subject"} + {label "[_ contacts.Subject]"} {html {size 55}} } {content:text(textarea),optional - {label "Message"} + {label "[_ contacts.Message]"} {html {cols 55 rows 18}} {help_text {remember that you can use mail merge substitutions. the most common wildcards are \{name\} \{first_names\}, \{last_name\}, \{home_address\} and \{date\}}} } @@ -89,34 +89,34 @@ set todays_date [lc_time_fmt [dt_sysdate] "%q"] append form_elements { {paper_type:text(select),optional - {label "Paper Type"} + {label "[_ contacts.Paper_Type]"} {options {{{Letter} letter} {Letterhead letterhead}}} } {date:text(inform),optional - {label "Date"} + {label "[_ contacts.Date]"} {value $todays_date} } {address:text(inform),optional - {label "Address"} + {label "[_ contacts.Address]"} {value "{name}
{mailing_address}"} {help_text {The recipeints name and mailing address will automatically be included so that they work with window envelopes}} } {content:richtext(richtext),optional - {label "Message"} + {label "[_ contacts.Message]"} {html {cols 70 rows 24}} - {help_text {remember that you can use mail merge substitutions. the most common wildcards are \{name\} \{first_names\}, \{last_name\}, \{home_address\} and \{date\}}} + {help_text {[_ contacts.lt_remember_that_you_can]}} } } } else { - error "labels are not implemented yet" + error "[_ contacts.lt_labels_are_not_implem]" } - set sig_options "{{-- no not include a signature --} \"none\"} [db_list_of_lists select_sigs {select title, signature from contact_signatures where party_id = :user_id}]" + set sig_options "{{[_ contacts.lt_--_no_not_include_a_s]} \"none\"} [db_list_of_lists select_sigs {select title, signature from contact_signatures where party_id = :user_id}]" append form_elements { - {include_signature:text(select),optional {label "Signature"} {options $sig_options} {help_text {you may modify your signatures}}} - {save_as:text(text),optional {label "Save Message As"} {html {size 35}}} + {include_signature:text(select),optional {label "[_ contacts.Signature]"} {options $sig_options} {help_text {you may modify [_ contacts.your_signatures]}}} + {save_as:text(text),optional {label "[_ contacts.Save_Message_As]"} {html {size 35}}} } append form_elements - set edit_buttons [list [list "Preview" create]] + set edit_buttons [list [list "[_ contacts.Preview]" create]] } @@ -125,7 +125,7 @@ ad_form -action message \ -name message \ - -cancel_label "Cancel" \ + -cancel_label "[_ contacts.Cancel]" \ -cancel_url $return_url \ -edit_buttons $edit_buttons \ -form $form_elements \ @@ -145,15 +145,15 @@ ] \ ] if { $content_raw == "" } { - template::element set_error message content "Message is required" + template::element set_error message content "[_ contacts.Message_is_required]" } } email { if { [string trim $subject] == "" } { - template::element set_error message subject "Subject is required" + template::element set_error message subject "[_ contacts.Subject_is_required]" } if { [string trim $content] == "" } { - template::element set_error message content "Message is required" + template::element set_error message content "[_ contacts.Message_is_required]" } } }