From 358962add031241006d61f1a20194acfa0f5467d Mon Sep 17 00:00:00 2001 From: Samuele Masetto Date: Fri, 14 May 2021 19:33:34 +0200 Subject: [PATCH] fixed unit translation for recurring contributions small fix double "every" and `p` tag fixed, removed final `else` --- .../Contribute/Form/Contribution/Confirm.tpl | 24 +++++++--- .../Contribute/Form/Contribution/ThankYou.tpl | 44 +++++++++++-------- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl index 617dadbabc..38cc30f0ae 100644 --- a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl @@ -110,14 +110,28 @@ {/if} {else} {if $frequency_interval > 1} -

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

+ {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} {else} -

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

+ {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 processed every week.{/ts}

+ {elseif $frequency_unit eq 'month'} +

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

+ {elseif $frequency_unit eq 'year'} +

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

+ {/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}

+

{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} diff --git a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl index a8b6de9a84..2943825169 100644 --- a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl +++ b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl @@ -133,29 +133,37 @@ {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}

{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}

+

{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} - {if $frequency_interval > 1} -

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

- {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} + {* 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 $is_email_receipt} - {ts}You will receive an email receipt which includes information about how to update or cancel this recurring contribution.{/ts} - {/if} + {/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} {/crmRegion} {/if} {/if} -- 2.25.1