diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json index 25d3d64608..c23e338cec 100644 --- a/src/app/i18n/locales/de.json +++ b/src/app/i18n/locales/de.json @@ -2053,9 +2053,9 @@ ], "comingSoonFeatures": ["Mail", "Fotos"] }, - "1GB": { - "title": "Kostenlos", - "features": ["1GB verschlüsselter Cloud-Speicher", "Verschlüsseltes VPN"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} verschlüsselter Cloud-Speicher", "Verschlüsseltes VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json index bf7d01a967..9536a5ebd1 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -2137,9 +2137,9 @@ ], "comingSoonFeatures": ["Mail", "Photos"] }, - "1GB": { - "title": "Free", - "features": ["1GB of encrypted storage", "Encrypted VPN"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} of encrypted storage", "Encrypted VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/es.json b/src/app/i18n/locales/es.json index 416587f897..0169c4c4dc 100644 --- a/src/app/i18n/locales/es.json +++ b/src/app/i18n/locales/es.json @@ -2113,9 +2113,9 @@ ], "comingSoonFeatures": ["Mail", "Fotos"] }, - "1GB": { - "title": "Gratis", - "features": ["1GB de almacenamiento en la nube cifrado", "VPN cifrada"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} de almacenamiento en la nube cifrado", "VPN cifrada"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/fr.json b/src/app/i18n/locales/fr.json index 83cb82d56d..5ec67d27e2 100644 --- a/src/app/i18n/locales/fr.json +++ b/src/app/i18n/locales/fr.json @@ -2059,9 +2059,9 @@ ], "comingSoonFeatures": ["Mail", "Photos"] }, - "1GB": { - "title": "Gratuit", - "features": ["1Go de stockage cloud chiffré", "VPN Chiffré"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} de stockage cloud chiffré", "VPN Chiffré"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/it.json b/src/app/i18n/locales/it.json index 4309e7787c..c0fbce7499 100644 --- a/src/app/i18n/locales/it.json +++ b/src/app/i18n/locales/it.json @@ -2166,9 +2166,9 @@ ], "comingSoonFeatures": ["Mail", "Foto"] }, - "1GB": { - "title": "Gratuito", - "features": ["1GB di spazio di archiviazione cloud crittografato", "VPN Crittografata"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} di spazio di archiviazione cloud crittografato", "VPN Crittografata"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/ru.json b/src/app/i18n/locales/ru.json index b8ab173d0e..8de89fbd5b 100644 --- a/src/app/i18n/locales/ru.json +++ b/src/app/i18n/locales/ru.json @@ -2074,9 +2074,9 @@ ], "comingSoonFeatures": ["Mail (Почта)", "Фотографии"] }, - "1GB": { - "title": "Free (Бесплатный)", - "features": ["1 ГБ зашифрованного облачного хранилища", "Зашифрованный VPN"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} зашифрованного облачного хранилища", "Зашифрованный VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/tw.json b/src/app/i18n/locales/tw.json index feb7fd34ed..3f63e34caa 100644 --- a/src/app/i18n/locales/tw.json +++ b/src/app/i18n/locales/tw.json @@ -2064,9 +2064,9 @@ ], "comingSoonFeatures": ["郵件 (Mail)", "照片(Photos)"] }, - "1GB": { - "title": "Free (免費版)", - "features": ["1GB 加密雲端儲存空間", "加密 VPN"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} 加密雲端儲存空間", "加密 VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json index 72ee6cb405..cdb84bbf39 100644 --- a/src/app/i18n/locales/zh.json +++ b/src/app/i18n/locales/zh.json @@ -2101,9 +2101,9 @@ ], "comingSoonFeatures": ["邮件 (Mail)", "照片 (Photos)"] }, - "1GB": { - "title": "Free (免费版)", - "features": ["1GB 加密云存储空间", "加密 VPN"] + "default": { + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} 加密云存储空间", "加密 VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/views/Checkout/components/CheckoutProductCard.tsx b/src/views/Checkout/components/CheckoutProductCard.tsx index 9285662981..3e31f24a51 100644 --- a/src/views/Checkout/components/CheckoutProductCard.tsx +++ b/src/views/Checkout/components/CheckoutProductCard.tsx @@ -68,11 +68,19 @@ export const CheckoutProductCard = ({ const planType = 'planFeaturesList'; - const productLabel = translate(`preferences.account.plans.${planType}.${bytes}.title`) ?? bytes; - const featureKeys = - translateList(`preferences.account.plans.${planType}.${bytes ?? 'freeFeatures'}.features`, { - returnObjects: true, - }) ?? translateList('preferences.account.plans.planFeaturesList.1GB.features'); + const specificTitleKey = `preferences.account.plans.${planType}.${bytes}.title`; + const specificTransalatedKey = translate(specificTitleKey); + const productLabel = + specificTransalatedKey === specificTitleKey + ? translate('preferences.account.plans.planFeaturesList.default.bytesTitle', { bytes }) + : specificTransalatedKey; + + const specificFeatures = translateList(`preferences.account.plans.${planType}.${bytes}.features`, { + returnObjects: true, + }); + const featureKeys = Array.isArray(specificFeatures) + ? specificFeatures + : translateList('preferences.account.plans.planFeaturesList.default.features', { bytes, returnObjects: true }); const featuresList = Array.isArray( translateList(`preferences.account.plans.${planType}.${bytes}.comingSoonFeatures`), diff --git a/src/views/NewSettings/components/Sections/Account/Plans/components/PlanCard.tsx b/src/views/NewSettings/components/Sections/Account/Plans/components/PlanCard.tsx index cdec262094..24ed1830b0 100644 --- a/src/views/NewSettings/components/Sections/Account/Plans/components/PlanCard.tsx +++ b/src/views/NewSettings/components/Sections/Account/Plans/components/PlanCard.tsx @@ -88,7 +88,15 @@ const PlanDetailsList = ({ planSpace }: { planSpace: string }) => { const { translateList } = useTranslationContext(); const planType = 'planFeaturesList'; - const featureKeys = translateList(`preferences.account.plans.${planType}.${planSpace ?? 'freeFeatures'}.features`); + const specificFeatures = translateList(`preferences.account.plans.${planType}.${planSpace}.features`, { + returnObjects: true, + }); + const featureKeys = Array.isArray(specificFeatures) + ? specificFeatures + : translateList('preferences.account.plans.planFeaturesList.default.features', { + bytes: planSpace, + returnObjects: true, + }); const comingSoonFeatureKeys = translateList(`preferences.account.plans.${planType}.${planSpace}.comingSoonFeatures`);