diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 35db89aaf868..0927ea414dfe 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -121,6 +121,37 @@ protected function getTemplateUpdates() { ['name' => 'pledge_acknowledge', 'type' => 'html'], ], ], + [ + 'version' => '5.20.alpha1', + 'upgrade_descriptor' => ts('Aditional email greetings and translation fixes'), + 'templates' => [ + ['name' => 'contribution_recurring_billing', 'type' => 'html'], + ['name' => 'contribution_recurring_billing', 'type' => 'text'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'html'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'text'], + ['name' => 'contribution_recurring_edit', 'type' => 'html'], + ['name' => 'contribution_recurring_edit', 'type' => 'text'], + ['name' => 'contribution_recurring_notify', 'type' => 'html'], + ['name' => 'contribution_recurring_notify', 'type' => 'text']', + ['name' => 'event_registration_receipt', 'type' => 'html'], + ['name' => 'event_registration_receipt', 'type' => 'text'], + ['name' => 'membership_autorenew_billing', 'type' => 'html'], + ['name' => 'membership_autorenew_billing', 'type' => 'text'], + ['name' => 'participant_cancelled', 'type' => 'html'], + ['name' => 'participant_cancelled', 'type' => 'text'], + ['name' => 'participant_confirm', 'type' => 'html'], + ['name' => 'participant_confirm', 'type' => 'text'], + ['name' => 'participant_expired', 'type' => 'html'], + ['name' => 'participant_expired', 'type' => 'text'], + ['name' => 'participant_transferred', 'type' => 'html'], + ['name' => 'participant_transferred', 'type' => 'text'], + ['name' => 'pcp_supporter_notify', 'type' => 'html'], + ['name' => 'pcp_supporter_notify', 'type' => 'text'], + ['name' => 'pledge_reminder', 'type' => 'html'], + ['name' => 'pledge_reminder', 'type' => 'text'], + ], + ], + ]; } diff --git a/xml/templates/message_templates/contribution_recurring_billing_html.tpl b/xml/templates/message_templates/contribution_recurring_billing_html.tpl index f2b9d4884239..14df6973eb56 100644 --- a/xml/templates/message_templates/contribution_recurring_billing_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_billing_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Billing details for your recurring contribution of %1, every %2 %3 have been updated.{/ts}

@@ -62,4 +62,4 @@ - \ No newline at end of file + diff --git a/xml/templates/message_templates/contribution_recurring_billing_text.tpl b/xml/templates/message_templates/contribution_recurring_billing_text.tpl index 37e7ed750216..c71682e9074e 100644 --- a/xml/templates/message_templates/contribution_recurring_billing_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_billing_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Billing details for your recurring contribution of %1, every %2 %3 have been updated.{/ts} @@ -20,4 +20,4 @@ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} -{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} \ No newline at end of file +{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} diff --git a/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl b/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl index 674333e079fb..d04dd909a3be 100644 --- a/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts}

diff --git a/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl b/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl index f10d37432f5c..0b23d8eac013 100644 --- a/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl @@ -1,3 +1,3 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts} diff --git a/xml/templates/message_templates/contribution_recurring_edit_html.tpl b/xml/templates/message_templates/contribution_recurring_edit_html.tpl index 0ef701f9c28b..c1a9ae77ca12 100644 --- a/xml/templates/message_templates/contribution_recurring_edit_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_edit_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts}Your recurring contribution has been updated as requested:{/ts}

{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2 %3(s){/ts}{if $installments}{ts 1=$installments} for %1 installments{/ts}{/if}.

diff --git a/xml/templates/message_templates/contribution_recurring_edit_text.tpl b/xml/templates/message_templates/contribution_recurring_edit_text.tpl index b1e038b5da3d..af99606cd180 100644 --- a/xml/templates/message_templates/contribution_recurring_edit_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_edit_text.tpl @@ -1,8 +1,8 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts}Your recurring contribution has been updated as requested:{/ts} {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2 %3(s){/ts} {if $installments}{ts 1=$installments} for %1 installments.{/ts}{/if} -{ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts} \ No newline at end of file +{ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts} diff --git a/xml/templates/message_templates/contribution_recurring_notify_html.tpl b/xml/templates/message_templates/contribution_recurring_notify_html.tpl index e2b09248355a..201a5596f398 100644 --- a/xml/templates/message_templates/contribution_recurring_notify_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_notify_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$displayName}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} diff --git a/xml/templates/message_templates/contribution_recurring_notify_text.tpl b/xml/templates/message_templates/contribution_recurring_notify_text.tpl index b0db9b5a31d2..19251cdba918 100644 --- a/xml/templates/message_templates/contribution_recurring_notify_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_notify_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$displayName}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {if $recur_txnType eq 'START'} {if $auto_renew_membership} diff --git a/xml/templates/message_templates/event_registration_receipt_html.tpl b/xml/templates/message_templates/event_registration_receipt_html.tpl index 3436a1903486..cb732bcc1ed1 100644 --- a/xml/templates/message_templates/event_registration_receipt_html.tpl +++ b/xml/templates/message_templates/event_registration_receipt_html.tpl @@ -9,7 +9,7 @@ {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture} {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture} -

Dear {contact.display_name},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} {if $is_pay_later}

This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received. diff --git a/xml/templates/message_templates/event_registration_receipt_text.tpl b/xml/templates/message_templates/event_registration_receipt_text.tpl index 695b53d60432..7ce744673c77 100644 --- a/xml/templates/message_templates/event_registration_receipt_text.tpl +++ b/xml/templates/message_templates/event_registration_receipt_text.tpl @@ -1,4 +1,5 @@ -Dear {contact.display_name}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {if $is_pay_later} This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received. {else} diff --git a/xml/templates/message_templates/membership_autorenew_billing_html.tpl b/xml/templates/message_templates/membership_autorenew_billing_html.tpl index a8ec69f11623..9ff740f8b7d0 100644 --- a/xml/templates/message_templates/membership_autorenew_billing_html.tpl +++ b/xml/templates/message_templates/membership_autorenew_billing_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts}

diff --git a/xml/templates/message_templates/membership_autorenew_billing_text.tpl b/xml/templates/message_templates/membership_autorenew_billing_text.tpl index 8df337a3a21b..dcd942971c9e 100644 --- a/xml/templates/message_templates/membership_autorenew_billing_text.tpl +++ b/xml/templates/message_templates/membership_autorenew_billing_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts} @@ -20,4 +20,4 @@ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} -{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} \ No newline at end of file +{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} diff --git a/xml/templates/message_templates/participant_cancelled_html.tpl b/xml/templates/message_templates/participant_cancelled_html.tpl index 4a882c1259b3..062f610cb7d2 100644 --- a/xml/templates/message_templates/participant_cancelled_html.tpl +++ b/xml/templates/message_templates/participant_cancelled_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts}Your Event Registration has been cancelled.{/ts}

diff --git a/xml/templates/message_templates/participant_cancelled_text.tpl b/xml/templates/message_templates/participant_cancelled_text.tpl index b4430b33d194..684983682f1e 100644 --- a/xml/templates/message_templates/participant_cancelled_text.tpl +++ b/xml/templates/message_templates/participant_cancelled_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts}Your Event Registration has been cancelled.{/ts} diff --git a/xml/templates/message_templates/participant_confirm_html.tpl b/xml/templates/message_templates/participant_confirm_html.tpl index ca6816d166f3..d457043646aa 100644 --- a/xml/templates/message_templates/participant_confirm_html.tpl +++ b/xml/templates/message_templates/participant_confirm_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} {if !$isAdditional and $participant.id} @@ -33,13 +33,13 @@ {capture assign=confirmUrl}{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$participant.id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture} - Go to a web page where you can confirm your registration online + {ts}Go to a web page where you can confirm your registration online{/ts} {/if} {if $event.allow_selfcancelxfer } This event allows for self-cancel or transfer - {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participantID`&{contact.checksum}" h=0 a=1 fe=1}{/capture} + {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participantID`&{contact.checksum}" h=0 a=1 fe=1}{/capture} {ts}Self service cancel transfer{/ts} {/if} diff --git a/xml/templates/message_templates/participant_confirm_text.tpl b/xml/templates/message_templates/participant_confirm_text.tpl index e8f90132b5c1..dbadd748349a 100644 --- a/xml/templates/message_templates/participant_confirm_text.tpl +++ b/xml/templates/message_templates/participant_confirm_text.tpl @@ -1,4 +1,5 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {if !$isAdditional and $participant.id} =========================================================== diff --git a/xml/templates/message_templates/participant_expired_html.tpl b/xml/templates/message_templates/participant_expired_html.tpl index a11ff72685cf..290a37cf2466 100644 --- a/xml/templates/message_templates/participant_expired_html.tpl +++ b/xml/templates/message_templates/participant_expired_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1=$event.event_title}Your pending event registration for %1 has expired because you did not confirm your registration.{/ts}

{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions diff --git a/xml/templates/message_templates/participant_expired_text.tpl b/xml/templates/message_templates/participant_expired_text.tpl index be649c11daee..56acebfb5f14 100644 --- a/xml/templates/message_templates/participant_expired_text.tpl +++ b/xml/templates/message_templates/participant_expired_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts 1=$event.event_title}Your pending event registration for %1 has expired because you did not confirm your registration.{/ts} diff --git a/xml/templates/message_templates/participant_transferred_html.tpl b/xml/templates/message_templates/participant_transferred_html.tpl index 26cbf37e1524..9a21f1b010de 100644 --- a/xml/templates/message_templates/participant_transferred_html.tpl +++ b/xml/templates/message_templates/participant_transferred_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1=$to_participant}Your Event Registration has been Transferred to %1.{/ts}

diff --git a/xml/templates/message_templates/participant_transferred_text.tpl b/xml/templates/message_templates/participant_transferred_text.tpl index aeac8a7ba159..449594828ee4 100644 --- a/xml/templates/message_templates/participant_transferred_text.tpl +++ b/xml/templates/message_templates/participant_transferred_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts 1=$to_participant}Your Event Registration has been transferred to %1.{/ts} diff --git a/xml/templates/message_templates/pcp_supporter_notify_html.tpl b/xml/templates/message_templates/pcp_supporter_notify_html.tpl index d0e429b5cba5..a3e2c389e57d 100644 --- a/xml/templates/message_templates/pcp_supporter_notify_html.tpl +++ b/xml/templates/message_templates/pcp_supporter_notify_html.tpl @@ -21,7 +21,7 @@ -

{ts}Dear supporter{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1="$contribPageTitle"}Thanks for creating a personal campaign page in support of %1.{/ts}

diff --git a/xml/templates/message_templates/pcp_supporter_notify_text.tpl b/xml/templates/message_templates/pcp_supporter_notify_text.tpl index 6f00d5cc0dad..872ce3f2776f 100644 --- a/xml/templates/message_templates/pcp_supporter_notify_text.tpl +++ b/xml/templates/message_templates/pcp_supporter_notify_text.tpl @@ -1,4 +1,5 @@ -{ts}Dear supporter{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {ts 1="$contribPageTitle"}Thanks for creating a personal campaign page in support of %1.{/ts} {if $pcpStatus eq 'Approved'} diff --git a/xml/templates/message_templates/pledge_reminder_html.tpl b/xml/templates/message_templates/pledge_reminder_html.tpl index c2e42a57748e..f59fd86f4ba1 100644 --- a/xml/templates/message_templates/pledge_reminder_html.tpl +++ b/xml/templates/message_templates/pledge_reminder_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$contact.display_name}Dear %1{/ts},

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts 1=$next_payment|truncate:10:''|crmDate}This is a reminder that the next payment on your pledge is due on %1.{/ts}

diff --git a/xml/templates/message_templates/pledge_reminder_text.tpl b/xml/templates/message_templates/pledge_reminder_text.tpl index 2761c3d36ac8..6ff194224f21 100644 --- a/xml/templates/message_templates/pledge_reminder_text.tpl +++ b/xml/templates/message_templates/pledge_reminder_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts 1=$next_payment|truncate:10:''|crmDate}This is a reminder that the next payment on your pledge is due on %1.{/ts}