diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json index c23e338ce..da2e0c1d1 100644 --- a/src/app/i18n/locales/de.json +++ b/src/app/i18n/locales/de.json @@ -257,7 +257,7 @@ }, "apply": "Anwenden", "taxes": "Steuern", - "annualBillingTemplate": "Jahresplan, monatlich abgerechnet mit {{price}}{{currency}}/Monat für 12 Monate" + "annualBillingTemplate": "Jahresplan, Abrechnung von {{priceNow}}{{currency}} für den ersten Monat, dann Verlängerung für {{price}}{{currency}}/Monat" }, "confirmCryptoPayment": { "title": "Zahlung bestätigen", diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json index 9536a5ebd..cf7e9be0f 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -305,7 +305,7 @@ }, "apply": "Apply", "taxes": "Taxes", - "annualBillingTemplate": "Annual plan, billed monthly at {{price}}{{currency}}/month for 12 months" + "annualBillingTemplate": "Annual plan, billed at {{priceNow}}{{currency}} for the first month, then renews at {{price}}{{currency}}/month" }, "confirmCryptoPayment": { "title": "Confirm the payment", diff --git a/src/app/i18n/locales/es.json b/src/app/i18n/locales/es.json index 0169c4c4d..d344e5431 100644 --- a/src/app/i18n/locales/es.json +++ b/src/app/i18n/locales/es.json @@ -284,7 +284,7 @@ }, "apply": "Aplicar", "taxes": "Impuestos", - "annualBillingTemplate": "Plan anual, facturado mensualmente a {{price}}{{currency}}/mes durante 12 meses" + "annualBillingTemplate": "Plan anual, facturado a {{priceNow}}{{currency}} el primer mes, luego se renueva a {{price}}{{currency}}/mes" }, "confirmCryptoPayment": { "title": "Confirmar el pago", diff --git a/src/app/i18n/locales/fr.json b/src/app/i18n/locales/fr.json index 5ec67d27e..7d6d0d8bc 100644 --- a/src/app/i18n/locales/fr.json +++ b/src/app/i18n/locales/fr.json @@ -257,7 +257,7 @@ }, "apply": "Appliquer", "taxes": "Taxes", - "annualBillingTemplate": "Plan annuel, facturé mensuellement à {{price}}{{currency}}/mois pendant 12 mois" + "annualBillingTemplate": "Plan annuel, facturé {{priceNow}}{{currency}} le premier mois, puis renouvelé à {{price}}{{currency}}/mois" }, "confirmCryptoPayment": { "title": "Confirmer le paiement", diff --git a/src/app/i18n/locales/it.json b/src/app/i18n/locales/it.json index c0fbce749..50209ec92 100644 --- a/src/app/i18n/locales/it.json +++ b/src/app/i18n/locales/it.json @@ -348,7 +348,7 @@ }, "apply": "Applica", "taxes": "Tasse", - "annualBillingTemplate": "Piano annuale, fatturato mensilmente a {{price}}{{currency}}/mese per 12 mesi" + "annualBillingTemplate": "Piano annuale, fatturato a {{priceNow}}{{currency}} per il primo mese, poi si rinnova a {{price}}{{currency}}/mese" }, "confirmCryptoPayment": { "title": "Conferma il pagamento", diff --git a/src/app/i18n/locales/ru.json b/src/app/i18n/locales/ru.json index 8de89fbd5..a9018f91f 100644 --- a/src/app/i18n/locales/ru.json +++ b/src/app/i18n/locales/ru.json @@ -257,7 +257,7 @@ }, "apply": "Применить", "taxes": "Налоги", - "annualBillingTemplate": "Годовой план, ежемесячная оплата {{price}}{{currency}}/мес. в течение 12 месяцев" + "annualBillingTemplate": "Годовой план, оплата {{priceNow}}{{currency}} за первый месяц, далее продлевается за {{price}}{{currency}}/мес." }, "confirmCryptoPayment": { "title": "Подтвердить платеж", diff --git a/src/app/i18n/locales/tw.json b/src/app/i18n/locales/tw.json index 3f63e34ca..0eb4a7474 100644 --- a/src/app/i18n/locales/tw.json +++ b/src/app/i18n/locales/tw.json @@ -273,7 +273,7 @@ }, "apply": "應用", "taxes": "稅金", - "annualBillingTemplate": "年度計劃,每月 {{price}}{{currency}}/月,持續 12 個月" + "annualBillingTemplate": "年度計劃,第一個月費用為 {{priceNow}}{{currency}},之後以 {{price}}{{currency}}/月續訂" }, "confirmCryptoPayment": { "title": "確認付款", diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json index cdb84bbf3..f80d40635 100644 --- a/src/app/i18n/locales/zh.json +++ b/src/app/i18n/locales/zh.json @@ -271,7 +271,7 @@ }, "apply": "应用", "taxes": "税费", - "annualBillingTemplate": "年度计划,每月 {{price}}{{currency}}/月,持续 12 个月" + "annualBillingTemplate": "年度计划,第一个月费用为 {{priceNow}}{{currency}},之后以 {{price}}{{currency}}/月续订" }, "confirmCryptoPayment": { "title": "确认付款", diff --git a/src/views/Checkout/components/CheckoutProductCard.tsx b/src/views/Checkout/components/CheckoutProductCard.tsx index 3e31f24a5..a62859be0 100644 --- a/src/views/Checkout/components/CheckoutProductCard.tsx +++ b/src/views/Checkout/components/CheckoutProductCard.tsx @@ -54,12 +54,11 @@ export const CheckoutProductCard = ({ const normalPriceAmount = priceData.decimalAmount; const totalLabel = translate('checkout.productCard.total'); - const renewalPeriodLabel = `${translate('checkout.productCard.renewalPeriod.renewsAt')} - ${currencySymbol}${normalPriceAmount}/${translate( - `checkout.productCard.renewalPeriod.${priceData.interval}`, - )}`; const planAmountWithoutTaxes = getProductAmount(priceData.decimalAmount, 1, couponCodeData); + const totalAmountFormatted = formatPrice(taxesData.decimalAmountWithTax); + const derivedTax = Math.max(0, Number(totalAmountFormatted) - Number(planAmountWithoutTaxes)); + const derivedTaxFormatted = formatPrice(derivedTax); const discountPercentage = couponCodeData?.amountOff && couponCodeData?.amountOff < taxesData.amountWithTax @@ -109,12 +108,12 @@ export const CheckoutProductCard = ({
- {taxesData.decimalTax > 0 && ( + {Number(derivedTaxFormatted) > 0 && ({translate('checkout.productCard.taxes')}
{currencySymbol} - {taxesData.decimalTax} + {derivedTaxFormatted}
{totalLabel}
{currencySymbol} - {formatPrice(taxesData.decimalAmountWithTax)} + {totalAmountFormatted}
@@ -254,11 +253,10 @@ export const CheckoutProductCard = ({ )} - {couponCodeData && priceData.interval !== 'lifetime' &&{renewalPeriodLabel}
} - {showHardcodedRenewal &&{showHardcodedRenewal}
} {priceData.interval === 'month' && ({translate('checkout.productCard.annualBillingTemplate', { + priceNow: totalAmountFormatted, price: normalPriceAmount, currency: currencySymbol, })} diff --git a/src/views/Checkout/components/CryptoPaymentDialog.tsx b/src/views/Checkout/components/CryptoPaymentDialog.tsx index f7912ccb5..d308f1984 100644 --- a/src/views/Checkout/components/CryptoPaymentDialog.tsx +++ b/src/views/Checkout/components/CryptoPaymentDialog.tsx @@ -9,6 +9,7 @@ import { useTranslationContext } from 'app/i18n/provider/TranslationProvider'; import notificationsService, { ToastType } from 'app/notifications/services/notifications.service'; import checkoutService from '../services/checkout.service'; import { Currency } from '../types'; +import { formatPrice } from '../utils/formatPrice'; import { useEffect, useState } from 'react'; import { errorService } from 'services'; @@ -166,7 +167,7 @@ export const CryptoPaymentDialog = () => {
- {fiat.amount} {Currency[fiat.currency]} + {formatPrice(fiat.amount)} {Currency[fiat.currency]}