From d8a6364b282550206396bb99fd42031c1c574f46 Mon Sep 17 00:00:00 2001 From: Mathieu Lu Date: Wed, 16 Oct 2024 13:59:51 -0400 Subject: [PATCH 1/4] dev/translation#90 Fix recurring unit translation on ContributionPage Confirm --- .../Contribute/Form/Contribution/Confirm.tpl | 100 ++++++++++-------- 1 file changed, 58 insertions(+), 42 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl index 68f4cf4c23ea..86e887eca8ab 100644 --- a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl @@ -77,56 +77,72 @@ {if $is_recur} {if !empty($auto_renew)} {* Auto-renew membership confirmation *} {crmRegion name="contribution-confirm-recur-membership"} -
-

- - {if $autoRenewOption == 1} - {ts 1=$frequency_interval 2=$frequency_unit}I want this membership to be renewed automatically every %1 %2(s).{/ts} - {elseif $autoRenewOption == 2} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 %2(s).{/ts} +
+ {if $frequency_interval > 1} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 days.{/ts} + {elseif $frequency_unit eq 'week'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 weeks.{/ts} + {elseif $frequency_unit eq 'month'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 months.{/ts} + {elseif $frequency_unit eq 'year'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} {/if} -
-

-
- ({ts}Your initial membership fee will be processed once you complete the confirmation step. You will be able to cancel the auto-renewal option by visiting the web page link that will be included in your receipt.{/ts} - ) -
+ {else} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts}This membership will be renewed automatically every day.{/ts} + {elseif $frequency_unit eq 'week'} + {ts}This membership will be renewed automatically every week.{/ts} + {elseif $frequency_unit eq 'month'} + {ts}This membership will be renewed automatically every month.{/ts} + {elseif $frequency_unit eq 'year'} + {ts}This membership will be renewed automatically every year.{/ts} + {/if} + {/if} +
{ts}Your initial membership fee will be processed once you complete the confirmation step. You will be able to cancel the auto-renewal option by visiting the web page link that will be included in your receipt.{/ts}
{/crmRegion} {else} {crmRegion name="contribution-confirm-recur"} - {if $installments} - {if $frequency_interval > 1} -

- {ts 1=$frequency_interval 2=$frequency_unit 3=$installments}I want to contribute this amount every %1 %2s for %3 installments.{/ts} -

- {else} -

- {ts 1=$frequency_unit 2=$installments}I want to contribute this amount every %1 for %2 installments.{/ts} -

- {/if} - {else} - {if $frequency_interval > 1} - {if $frequency_unit eq 'day'} -

{ts 1=$frequency_interval}I want to contribute this amount every %1 days.{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts 1=$frequency_interval}I want to contribute this amount every %1 weeks.{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts 1=$frequency_interval}I want to contribute this amount every %1 months.{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts 1=$frequency_interval}I want to contribute this amount every %1 years.{/ts}

+ {if $installments > 1} + {if $frequency_interval > 1} + {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 days for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 weeks for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 months for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 years for a total %3 installments (including this initial contribution).{/ts}

+ {/if} + {else} +

{ts 1=$frequency_unit 2=$installments}This recurring contribution will be automatically processed every %1 for a total %2 installments (including this initial contribution).{/ts}

{/if} {else} - {if $frequency_unit eq 'day'} -

{ts}I want to contribute this amount every day.{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts}I want to contribute this amount every week.{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts}I want to contribute this amount every month.{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts}I want to contribute this amount every year.{/ts}

+ {if $frequency_interval > 1} + {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 days.{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 weeks.{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 months.{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 years.{/ts}

+ {/if} + {else} + {* dev/translation#32 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} +

{ts}This contribution will be automatically processed every day.{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts}This contribution will be automatically processed every week.{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts}This contribution will be automatically processed every month.{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts}This contribution will be automatically processed every year.{/ts}

+ {/if} {/if} {/if} - {/if}

{ts}Your initial contribution will be processed once you complete the confirmation step. You will be able to cancel the recurring contribution by visiting the web page link that will be included in your receipt.{/ts}

{/crmRegion} {/if} From df1fea4be664401e6f07dc8a2c17053ca2d33398 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 16 Oct 2024 09:00:09 +1300 Subject: [PATCH 2/4] Translability improvement - get rid of %unit(s) The (s) pattern doesn't work for translation --- .../Contribute/Form/Contribution/ThankYou.tpl | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl index 74854f2d1696..3ddf0e9a0c04 100644 --- a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl +++ b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl @@ -118,7 +118,16 @@
{if !$installments || $installments > 1} {if $frequency_interval > 1} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 %2(s).{/ts} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 days.{/ts} + {elseif $frequency_unit eq 'week'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 weeks.{/ts} + {elseif $frequency_unit eq 'month'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 months.{/ts} + {elseif $frequency_unit eq 'year'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} + {/if} {else} {ts 1=$frequency_unit}This membership will be renewed automatically every %1.{/ts} {/if} @@ -140,7 +149,15 @@ {crmRegion name="contribution-thankyou-recur"} {if $installments > 1} {if $frequency_interval > 1} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 %2s for a total %3 installments (including this initial contribution).{/ts}

+ {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 days for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 weeks for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 months for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 years for a total %3 installments (including this initial contribution).{/ts}

+ {/if} {else}

{ts 1=$frequency_unit 2=$installments}This recurring contribution will be automatically processed every %1 for a total %2 installments (including this initial contribution).{/ts}

{/if} From f4d5f3ab30ba21c537f20a1aaf9a2f37f5e206d5 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 15 Oct 2024 13:27:28 +1300 Subject: [PATCH 3/4] dev/translation#90 address translation issue on membership --- templates/CRM/Contribute/Form/Contribution/ThankYou.tpl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl index 3ddf0e9a0c04..5dcd0f0f48dd 100644 --- a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl +++ b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl @@ -116,7 +116,6 @@ {if !empty($auto_renew)} {* Auto-renew membership confirmation *} {crmRegion name="contribution-thankyou-recur-membership"}
- {if !$installments || $installments > 1} {if $frequency_interval > 1} {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} {if $frequency_unit eq 'day'} @@ -129,9 +128,6 @@ {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} {/if} {else} - {ts 1=$frequency_unit}This membership will be renewed automatically every %1.{/ts} - {/if} - {else} {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} {if $frequency_unit eq 'day'} {ts}This membership will be renewed automatically every day.{/ts} @@ -142,7 +138,7 @@ {elseif $frequency_unit eq 'year'} {ts}This membership will be renewed automatically every year.{/ts} {/if} - {/if} + {/if}
({ts}You will receive an email receipt which includes information about how to cancel the auto-renewal option.{/ts})
{/crmRegion} {else} From ae08eda6eeecbfe9b2f2f3c199b5caf91de75aa9 Mon Sep 17 00:00:00 2001 From: Mathieu Lu Date: Wed, 16 Oct 2024 14:45:36 -0400 Subject: [PATCH 4/4] Contribution Confirm/ThankYou.tpl cleanup --- .../Contribute/Form/Contribution/Confirm.tpl | 303 +++++++++--------- .../Form/Contribution/MembershipBlock.tpl | 28 +- .../Contribute/Form/Contribution/ThankYou.tpl | 247 +++++++------- 3 files changed, 280 insertions(+), 298 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl index 86e887eca8ab..dda637730193 100644 --- a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl @@ -10,7 +10,7 @@ {if $action & 1024} {include file="CRM/Contribute/Form/Contribution/PreviewHeader.tpl"} {/if} - +{* Please keep Confirm.tpl and ThankYou.tpl somewhat in sync *}

{ts}Please verify the information below carefully. Click Go Back if you need to make changes.{/ts} @@ -32,138 +32,136 @@ {if !$membershipBlock AND $amount OR ($isDisplayLineItems and $lineItem)}{ts}Contribution Amount{/ts}{else}{ts}Membership Fee{/ts} {/if}

-
- {if $isDisplayLineItems && $lineItem} - {if !$amount}{assign var="amount" value=0}{/if} - {assign var="totalAmount" value=$amount} - {include file="CRM/Price/Page/LineItem.tpl" context="Contribution" getTaxDetails=$totalTaxAmount displayLineItemFinancialType=false pricesetFieldsCount=false currencySymbol='' hookDiscount=''} - {elseif $is_separate_payment} - {if $amount AND $minimum_fee} - {$membership_name} {ts}Membership{/ts}: - {$membershipTotalAmount|crmMoney} -
- {ts}Additional Contribution{/ts}: - {$nonMembershipTotalAmount|crmMoney} -
- ------------------------------------------- -
- {ts}Total{/ts}: - {$orderTotal|crmMoney} -
- {elseif $amount} - {ts}Amount{/ts}: - {$amount|crmMoney} {if $amount_level} - – {$amount_level}{/if} - {else} - {$membership_name} {ts}Membership{/ts}: - {$minimum_fee|crmMoney} - {/if} - {else} - {if $totalTaxAmount} - {ts 1=$taxTerm}Total %1 Amount{/ts}: - {$totalTaxAmount|crmMoney} -
- {/if} - {if $amount} - {if $installments}{ts}Installment Amount{/ts}{else}{ts}Total Amount{/ts}{/if}: - {$amount|crmMoney:$currency}{if $amount_level} - – {$amount_level}{/if} +
+
+ {if $isDisplayLineItems && $lineItem} + {if !$amount}{assign var="amount" value=0}{/if} + {assign var="totalAmount" value=$amount} + {include file="CRM/Price/Page/LineItem.tpl" context="Contribution" getTaxDetails=$totalTaxAmount displayLineItemFinancialType=false pricesetFieldsCount=false currencySymbol='' hookDiscount=''} + {elseif $is_separate_payment} + {if $amount AND $minimum_fee} + {$membership_name} {ts}Membership{/ts}: + {$membershipTotalAmount|crmMoney} +
+ {ts}Additional Contribution{/ts}: + {$nonMembershipTotalAmount|crmMoney} +
+ ------------------------------------------- +
+ {ts}Total{/ts}: + {$orderTotal|crmMoney} +
+ {elseif $amount} + {ts}Amount{/ts}: + {$amount|crmMoney} {if $amount_level} + – {$amount_level}{/if} + {else} + {$membership_name} {ts}Membership{/ts}: + {$minimum_fee|crmMoney} + {/if} {else} - {$membership_name} {ts}Membership{/ts}: - {$minimum_fee|crmMoney} + {if $totalTaxAmount} + {ts}Tax Amount{/ts}: {$totalTaxAmount|crmMoney}
+ {/if} + {if $amount} + {if $installments}{ts}Installment Amount{/ts}{else}{ts}Total Amount{/ts}{/if}: + {$amount|crmMoney:$currency}{if $amount_level} + – {$amount_level}{/if} + {else} + {$membership_name} {ts}Membership{/ts}: + {$minimum_fee|crmMoney} + {/if} {/if} - {/if} - {if $is_recur} - {if !empty($auto_renew)} {* Auto-renew membership confirmation *} - {crmRegion name="contribution-confirm-recur-membership"} -
- {if $frequency_interval > 1} - {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} - {if $frequency_unit eq 'day'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 days.{/ts} - {elseif $frequency_unit eq 'week'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 weeks.{/ts} - {elseif $frequency_unit eq 'month'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 months.{/ts} - {elseif $frequency_unit eq 'year'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} + {* Recurring contribution / pledge information *} + {if $is_recur} + {if !empty($auto_renew)} {* Auto-renew membership confirmation *} + {crmRegion name="contribution-confirm-recur-membership"} +

+ {if $frequency_interval > 1} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 days.{/ts} + {elseif $frequency_unit eq 'week'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 weeks.{/ts} + {elseif $frequency_unit eq 'month'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 months.{/ts} + {elseif $frequency_unit eq 'year'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} + {/if} + {else} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts}This membership will be renewed automatically every day.{/ts} + {elseif $frequency_unit eq 'week'} + {ts}This membership will be renewed automatically every week.{/ts} + {elseif $frequency_unit eq 'month'} + {ts}This membership will be renewed automatically every month.{/ts} + {elseif $frequency_unit eq 'year'} + {ts}This membership will be renewed automatically every year.{/ts} + {/if} {/if} - {else} - {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} - {if $frequency_unit eq 'day'} - {ts}This membership will be renewed automatically every day.{/ts} - {elseif $frequency_unit eq 'week'} - {ts}This membership will be renewed automatically every week.{/ts} - {elseif $frequency_unit eq 'month'} - {ts}This membership will be renewed automatically every month.{/ts} - {elseif $frequency_unit eq 'year'} - {ts}This membership will be renewed automatically every year.{/ts} - {/if} - {/if} -

{ts}Your initial membership fee will be processed once you complete the confirmation step. You will be able to cancel the auto-renewal option by visiting the web page link that will be included in your receipt.{/ts}
- {/crmRegion} - {else} - {crmRegion name="contribution-confirm-recur"} - {if $installments > 1} - {if $frequency_interval > 1} - {if $frequency_unit eq 'day'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 days for a total %3 installments (including this initial contribution).{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 weeks for a total %3 installments (including this initial contribution).{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 months for a total %3 installments (including this initial contribution).{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 years for a total %3 installments (including this initial contribution).{/ts}

+

+
{ts}Your initial membership fee will be processed once you complete the confirmation step. You will be able to cancel the auto-renewal option by visiting the web page link that will be included in your receipt.{/ts}
+ {/crmRegion} + {else} + {crmRegion name="contribution-confirm-recur"} + {if $installments > 1} + {if $frequency_interval > 1} + {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 days for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 weeks for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 months for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 years for a total %3 installments (including this initial contribution).{/ts}

+ {/if} + {else} +

{ts 1=$frequency_unit 2=$installments}This recurring contribution will be automatically processed every %1 for a total %2 installments (including this initial contribution).{/ts}

{/if} {else} -

{ts 1=$frequency_unit 2=$installments}This recurring contribution will be automatically processed every %1 for a total %2 installments (including this initial contribution).{/ts}

- {/if} - {else} - {if $frequency_interval > 1} - {if $frequency_unit eq 'day'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 days.{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 weeks.{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 months.{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 years.{/ts}

- {/if} - {else} - {* dev/translation#32 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} - {if $frequency_unit eq 'day'} -

{ts}This contribution will be automatically processed every day.{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts}This contribution will be automatically processed every week.{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts}This contribution will be automatically processed every month.{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts}This contribution will be automatically processed every year.{/ts}

+ {if $frequency_interval > 1} + {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 days.{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 weeks.{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 months.{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 years.{/ts}

+ {/if} + {else} + {* dev/translation#32 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} +

{ts}This contribution will be automatically processed every day.{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts}This contribution will be automatically processed every week.{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts}This contribution will be automatically processed every month.{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts}This contribution will be automatically processed every year.{/ts}

+ {/if} {/if} {/if} - {/if} -

{ts}Your initial contribution will be processed once you complete the confirmation step. You will be able to cancel the recurring contribution by visiting the web page link that will be included in your receipt.{/ts}

- {/crmRegion} +

{ts}Your initial contribution will be processed once you complete the confirmation step. You will be able to cancel the recurring contribution by visiting the web page link that will be included in your receipt.{/ts}

+ {/crmRegion} + {/if} {/if} - {/if} - - {if $is_pledge} - {if $pledge_frequency_interval GT 1} -

- {ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %1 %2s for %3 installments.{/ts} -

- {else} -

- {ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %2 for %3 installments.{/ts} -

- {/if} - {if $is_pay_later} -

{ts 1=$receiptFromEmail 2=$button}Click "%2" below to register your pledge. You will be able to modify or cancel future pledge payments at any time by logging in to your account or contacting us at %1.{/ts}

- {else} -

{ts 1=$receiptFromEmail 2=$button}Your initial pledge payment will be processed when you click "%2" below. You will be able to modify or cancel future pledge payments at any time by logging in to your account or contacting us at %1.{/ts}

+ {if $is_pledge} + {if $pledge_frequency_interval GT 1} +

{ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %1 %2s for %3 installments.{/ts}

+ {else} +

{ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %2 for %3 installments.{/ts}

+ {/if} + {if $is_pay_later} +

{ts 1=$receiptFromEmail 2=$button}Click "%2" below to register your pledge. You will be able to modify or cancel future pledge payments at any time by logging in to your account or contacting us at %1.{/ts}

+ {else} +

{ts 1=$receiptFromEmail 2=$button}Your initial pledge payment will be processed when you click "%2" below. You will be able to modify or cancel future pledge payments at any time by logging in to your account or contacting us at %1.{/ts}

+ {/if} {/if} - {/if} +
+
{/if} @@ -204,51 +202,48 @@ {if $pcp_is_anonymous} {ts}anonymously{/ts}. {else} - {ts}under the name{/ts}: - {$pcp_roll_nickname} -
+ {ts}under the name{/ts}: {$pcp_roll_nickname}
{if $pcp_personal_note} - {ts}With the personal note{/ts}: - {$pcp_personal_note} + {ts}With the personal note{/ts}: {$pcp_personal_note} {else} {ts}With no personal note{/ts} {/if} {/if} -
+
{/if} - {if $billingName or $address} -
-
+ {if $billingName or $address} +
+
{ts}Billing Name and Address{/ts} -
-
-
{$billingName}
-
-
-
-
{$address|nl2br}
-
-
- {/if} - {if $email && !$emailExists} -
-
- {ts}Your Email{/ts} +
+
{$billingName}
+
-
-
{$email}
+
+
{$address|nl2br}
{/if} + {if !$emailExists && $email} +
+
+ {ts}Your Email{/ts} +
+
+
{$email}
+
+
+
+ {/if} {* Show credit or debit card section for 'direct' mode, except for PayPal Express (detected because credit card number is empty) *} + {if in_array('credit_card_number', $paymentFields) || in_array('bank_account_number', $paymentFields) && ($amount GT 0 OR $minimum_fee GT 0)} {crmRegion name="contribution-confirm-billing-block"} - {if in_array('credit_card_number', $paymentFields) || in_array('bank_account_number', $paymentFields)}
{if $paymentFieldsetLabel}
@@ -257,10 +252,10 @@ {/if} {if in_array('bank_account_number', $paymentFields) && $bank_account_number}
- {ts}Account Holder{/ts}: {$account_holder}
- {ts}Bank Account Number{/ts}: {$bank_account_number}
- {ts}Bank Identification Number{/ts}: {$bank_identification_number}
- {ts}Bank Name{/ts}: {$bank_name}
+ {ts}Account Holder{/ts}: {$account_holder}
+ {ts}Bank Identification Number{/ts}: {$bank_identification_number}
+ {ts}Bank Name{/ts}: {$bank_name}
+ {ts}Bank Account Number{/ts}: {$bank_account_number}
{if $paymentAgreementText}
@@ -282,8 +277,8 @@
{/if}
- {/if} {/crmRegion} + {/if} {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="confirmContribution" showPremiumSelectionFields=false preview=false} diff --git a/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl b/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl index 04cd616d8e85..b91dbb3404da 100644 --- a/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl +++ b/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl @@ -26,30 +26,14 @@ {/if} {/if}
- {strip} - +
{foreach from=$membershipTypes item=row} -
- - - - - +

+ {$row.name} +
{$row.description} +

{/foreach} - {if array_key_exists('auto_renew', $form)} - - - - - {/if} -
- {$row.name}   -
- {$row.description}   -
-
{$form.auto_renew.html} - {$form.auto_renew.label} -
+
{/strip} {/if} diff --git a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl index 5dcd0f0f48dd..eab284a81160 100644 --- a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl +++ b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl @@ -10,7 +10,7 @@ {if $action & 1024} {include file="CRM/Contribute/Form/Contribution/PreviewHeader.tpl"} {/if} - +{* Please keep Confirm.tpl and ThankYou.tpl somewhat in sync *}
{if $thankyou_text}
@@ -78,135 +78,138 @@ {if !$membershipBlock AND $amount OR ($priceSetID and $lineItem)}{ts}Contribution Information{/ts}{else}{ts}Membership Fee{/ts}{/if}
-
- {if $lineItem and $priceSetID} - {if !$amount}{assign var="amount" value=0}{/if} - {assign var="totalAmount" value=$amount} - {include file="CRM/Price/Page/LineItem.tpl" context="Contribution" displayLineItemFinancialType=false pricesetFieldsCount=false currencySymbol='' hookDiscount=''} - {elseif $membership_amount} - {$membership_name} {ts}Membership{/ts}: {$membership_amount|crmMoney}
- {if $amount} - {if !$is_separate_payment} - {ts}Contribution Amount{/ts}: {$amount|crmMoney}
- {else} - {ts}Additional Contribution{/ts}: {$amount|crmMoney}
+
+
+ {if $lineItem and $priceSetID} + {if !$amount}{assign var="amount" value=0}{/if} + {assign var="totalAmount" value=$amount} + {include file="CRM/Price/Page/LineItem.tpl" context="Contribution" displayLineItemFinancialType=false pricesetFieldsCount=false currencySymbol='' hookDiscount=''} + {elseif $membership_amount} + {$membership_name} {ts}Membership{/ts}: {$membership_amount|crmMoney}
+ {if $amount} + {if !$is_separate_payment} + {ts}Contribution Amount{/ts}: {$amount|crmMoney}
+ {else} + {ts}Additional Contribution{/ts}: {$amount|crmMoney}
+ {/if} {/if} + -------------------------------------------
+ {ts}Total{/ts}: {$orderTotal|crmMoney}
+ {else} + {if $totalTaxAmount} + {ts}Tax Amount{/ts}: {$totalTaxAmount|crmMoney}
+ {/if} + {if $installments}{ts}Installment Amount{/ts}{else}{ts}Amount{/ts}{/if}: {$amount|crmMoney:$currency}{if $amount_level} – {$amount_level}{/if} {/if} - -------------------------------------------
- {ts}Total{/ts}: {$orderTotal|crmMoney}
- {else} - {if $totalTaxAmount} - {ts}Tax Amount{/ts}: {$totalTaxAmount|crmMoney}
- {/if} - {if $installments}{ts}Installment Amount{/ts}{else}{ts}Amount{/ts}{/if}: {$amount|crmMoney:$currency}{if $amount_level} – {$amount_level}{/if} - {/if} - {if $receive_date} - {ts}Date{/ts}: {$receive_date|crmDate}
- {/if} - {if $trxn_id} - {ts}Transaction #{/ts}: {$trxn_id}
- {/if} - {if $membership_trx_id} - {ts}Membership Transaction #{/ts}: {$membership_trx_id} - {/if} + {if $receive_date} + {ts}Date{/ts}: {$receive_date|crmDate}
+ {/if} + {if $trxn_id} + {ts}Transaction #{/ts}: {$trxn_id}
+ {/if} + {if $membership_trx_id} + {ts}Membership Transaction #{/ts}: {$membership_trx_id} + {/if} - {* Recurring contribution / pledge information *} - {if $is_recur} - {if !empty($auto_renew)} {* Auto-renew membership confirmation *} - {crmRegion name="contribution-thankyou-recur-membership"} -
- {if $frequency_interval > 1} - {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} - {if $frequency_unit eq 'day'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 days.{/ts} - {elseif $frequency_unit eq 'week'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 weeks.{/ts} - {elseif $frequency_unit eq 'month'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 months.{/ts} - {elseif $frequency_unit eq 'year'} - {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} + {* Recurring contribution / pledge information *} + {if $is_recur} + {if !empty($auto_renew)} {* Auto-renew membership confirmation *} + {crmRegion name="contribution-thankyou-recur-membership"} +

+ {if $frequency_interval > 1} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 days.{/ts} + {elseif $frequency_unit eq 'week'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 weeks.{/ts} + {elseif $frequency_unit eq 'month'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 months.{/ts} + {elseif $frequency_unit eq 'year'} + {ts 1=$frequency_interval 2=$frequency_unit}This membership will be renewed automatically every %1 years.{/ts} + {/if} + {else} + {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} + {ts}This membership will be renewed automatically every day.{/ts} + {elseif $frequency_unit eq 'week'} + {ts}This membership will be renewed automatically every week.{/ts} + {elseif $frequency_unit eq 'month'} + {ts}This membership will be renewed automatically every month.{/ts} + {elseif $frequency_unit eq 'year'} + {ts}This membership will be renewed automatically every year.{/ts} + {/if} + {/if} +

+
{ts}You will receive an email receipt which includes information about how to cancel the auto-renewal option.{/ts}
+ {/crmRegion} + {else} + {crmRegion name="contribution-thankyou-recur"} + {if $installments > 1} + {if $frequency_interval > 1} + {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 days for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 weeks for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 months for a total %3 installments (including this initial contribution).{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 years for a total %3 installments (including this initial contribution).{/ts}

+ {/if} + {else} +

{ts 1=$frequency_unit 2=$installments}This recurring contribution will be automatically processed every %1 for a total %2 installments (including this initial contribution).{/ts}

{/if} {else} - {* dev/translation#80 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} - {if $frequency_unit eq 'day'} - {ts}This membership will be renewed automatically every day.{/ts} - {elseif $frequency_unit eq 'week'} - {ts}This membership will be renewed automatically every week.{/ts} - {elseif $frequency_unit eq 'month'} - {ts}This membership will be renewed automatically every month.{/ts} - {elseif $frequency_unit eq 'year'} - {ts}This membership will be renewed automatically every year.{/ts} + {if $frequency_interval > 1} + {if $frequency_unit eq 'day'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 days.{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 weeks.{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 months.{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 years.{/ts}

+ {/if} + {else} + {* dev/translation#32 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} + {if $frequency_unit eq 'day'} +

{ts}This contribution will be automatically processed every day.{/ts}

+ {elseif $frequency_unit eq 'week'} +

{ts}This contribution will be automatically processed every week.{/ts}

+ {elseif $frequency_unit eq 'month'} +

{ts}This contribution will be automatically processed every month.{/ts}

+ {elseif $frequency_unit eq 'year'} +

{ts}This contribution will be automatically processed every year.{/ts}

+ {/if} {/if} {/if} -
({ts}You will receive an email receipt which includes information about how to cancel the auto-renewal option.{/ts})
- {/crmRegion} - {else} - {crmRegion name="contribution-thankyou-recur"} - {if $installments > 1} - {if $frequency_interval > 1} - {if $frequency_unit eq 'day'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 days for a total %3 installments (including this initial contribution).{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 weeks for a total %3 installments (including this initial contribution).{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 months for a total %3 installments (including this initial contribution).{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts 1=$frequency_interval 2=$frequency_unit 3=$installments}This recurring contribution will be automatically processed every %1 years for a total %3 installments (including this initial contribution).{/ts}

- {/if} - {else} -

{ts 1=$frequency_unit 2=$installments}This recurring contribution will be automatically processed every %1 for a total %2 installments (including this initial contribution).{/ts}

+ {if $is_email_receipt} +

+ {ts}You will receive an email receipt which includes information about how to update or cancel this recurring contribution.{/ts} +

{/if} + {/crmRegion} + {/if} + {/if} + {if $is_pledge} + {if $pledge_frequency_interval GT 1} +

{ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %1 %2s for %3 installments.{/ts}

+ {else} +

{ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %2 for %3 installments.{/ts}

+ {/if} +

+ {if $is_pay_later} + {ts 1=$receiptFromEmail}We will record your initial pledge payment when we receive it from you. You will be able to modify or cancel future pledge payments at any time by logging in to your account or contacting us at %1.{/ts} {else} - {if $frequency_interval > 1} - {if $frequency_unit eq 'day'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 days.{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 weeks.{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 months.{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts 1=$frequency_interval}This recurring contribution will be automatically processed every %1 years.{/ts}

- {/if} - {else} - {* dev/translation#32 All 'every %1' strings are incorrectly using ts, but focusing on the most important one until we find a better fix. *} - {if $frequency_unit eq 'day'} -

{ts}This contribution will be automatically processed every day.{/ts}

- {elseif $frequency_unit eq 'week'} -

{ts}This contribution will be automatically processed every week.{/ts}

- {elseif $frequency_unit eq 'month'} -

{ts}This contribution will be automatically processed every month.{/ts}

- {elseif $frequency_unit eq 'year'} -

{ts}This contribution will be automatically processed every year.{/ts}

- {/if} - {/if} + {ts 1=$receiptFromEmail}Your initial pledge payment has been processed. You will be able to modify or cancel future pledge payments at any time by contacting us at %1.{/ts} {/if} - {if $is_email_receipt} -

- {ts}You will receive an email receipt which includes information about how to update or cancel this recurring contribution.{/ts} -

+ {if $max_reminders} + {ts 1=$initial_reminder_day}We will send you a payment reminder %1 days prior to each scheduled payment date. The reminder will include a link to a page where you can make your payment online.{/ts} {/if} - {/crmRegion} - {/if} - {/if} - - {if $is_pledge} - {if $pledge_frequency_interval GT 1} -

{ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %1 %2s for %3 installments.{/ts}

- {else} -

{ts 1=$pledge_frequency_interval 2=$pledge_frequency_unit 3=$pledge_installments}I pledge to contribute this amount every %2 for %3 installments.{/ts}

+

{/if} -

- {if $is_pay_later} - {ts 1=$receiptFromEmail}We will record your initial pledge payment when we receive it from you. You will be able to modify or cancel future pledge payments at any time by logging in to your account or contacting us at %1.{/ts} - {else} - {ts 1=$receiptFromEmail}Your initial pledge payment has been processed. You will be able to modify or cancel future pledge payments at any time by contacting us at %1.{/ts} - {/if} - {if $max_reminders} - {ts 1=$initial_reminder_day}We will send you a payment reminder %1 days prior to each scheduled payment date. The reminder will include a link to a page where you can make your payment online.{/ts} - {/if} -

- {/if} +
+
{/if} @@ -214,7 +217,7 @@ {if $onbehalfProfile && $onbehalfProfile|@count}
{include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile prefix='onbehalf' hideFieldset=false} -
+
{/if} {if $honoreeProfileFields && $honoreeProfileFields|@count} @@ -223,12 +226,12 @@ {$soft_credit_type}
-
+
{$honorName}
{include file="CRM/UF/Form/Block.tpl" fields=$honoreeProfileFields prefix='honor' hideFieldset=false}
-
+
{/if} {if $customPre} @@ -277,7 +280,7 @@ {if !$emailExists && $email}
- {ts}Your Email{/ts} + {ts}Your Email{/ts}
{$email}
@@ -294,7 +297,7 @@ {$paymentFieldsetLabel}
{/if} - {if in_array('bank_account_number', $paymentFields) && $bank_account_number} + {if in_array('bank_account_number', $paymentFields) && $bank_account_number}
{ts}Account Holder{/ts}: {$account_holder}
{ts}Bank Identification Number{/ts}: {$bank_identification_number}