return $subject;
}
+sub generate_email_body {
+ $main::lxdebug->enter_sub();
+ my ($self) = @_;
+ # simple german and english will work grammatically (most european languages as well)
+ # Dear Mr Alan Greenspan:
+ # Sehr geehrte Frau Meyer,
+ # A l’attention de Mme Villeroy,
+ # Gentile Signora Ferrari,
+ my $body = '';
+
+ if ($self->{cp_id}) {
+ my $givenname = SL::DB::Contact->load_cached($self->{cp_id})->cp_givenname; # for qw(gender givename name);
+ my $name = SL::DB::Contact->load_cached($self->{cp_id})->cp_name; # for qw(gender givename name);
+ my $gender = SL::DB::Contact->load_cached($self->{cp_id})->cp_gender; # for qw(gender givename name);
+ my $mf = $gender eq 'f' ? 'female' : 'male';
+ $body = GenericTranslations->get(translation_type => "salutation_$mf", language_id => $self->{language_id});
+ $body .= ' ' . $givenname . ' ' . $name if $body;
+ } else {
+ $body = GenericTranslations->get(translation_type => "salutation_general", language_id => $self->{language_id});
+ }
+
+ return undef unless $body;
+
+ $body .= GenericTranslations->get(translation_type =>"salutation_punctuation_mark", language_id => $self->{language_id}) . "\n";
+ $body .= GenericTranslations->get(translation_type =>"preset_text_$self->{formname}", language_id => $self->{language_id});
+
+ $body = $main::locale->unquote_special_chars('HTML', $body);
+
+ $main::lxdebug->leave_sub();
+ return $body;
+}
+
sub cleanup {
$main::lxdebug->enter_sub();
'...done' => '...fertig',
'...on the TODO list' => '...auf der Aufgabenliste',
'0% tax with taxkey' => '0% Steuer mit Steuerschlüssel ',
+ '1)' => '1)',
'1. Quarter' => '1. Quartal',
'2 years' => '2 Jahre',
'2. Quarter' => '2. Quartal',
'Time/cost estimate actions' => 'Aktionen für Kosten-/Zeitabschätzung',
'Timerange' => 'Zeitraum',
'Timestamp' => 'Uhrzeit',
+ 'Tired of copying always nice phrases for this message? Click here to use the new preset message option!' => 'Müde vom vielen Copy & Paste aus vorherigen Anschreiben? Hier klicken, um E-Mail-Texte vorzudefinieren!',
'Title' => 'Titel',
'To' => 'An',
'To (email)' => 'An',
</tr>
<tr valign="top">
- <th align="right" nowrap>[% LxERP.t8("Message") %]</th>
+ <th align="right" nowrap>[% LxERP.t8("Message") %]
+ <sup> [% L.link("generictranslations.pl?action=edit_email_strings", "1)", title=LxERP.t8('Tired of copying always nice phrases for this message? Click here to use the new preset message option!'), target="_blank") %]</sup>
+ </th>
<td>[% L.textarea_tag("email_form.message", email_form.message, rows="15" cols="80" wrap="soft") %]</td>
</tr>