diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json index ec4b745f9..e93bb8128 100644 --- a/src/app/i18n/locales/de.json +++ b/src/app/i18n/locales/de.json @@ -2051,9 +2051,10 @@ ], "comingSoonFeatures": ["Mail", "Fotos"] }, - "1GB": { - "title": "Kostenlos", - "features": ["1GB verschlüsselter Cloud-Speicher", "Verschlüsseltes VPN"] + "default": { + "freeTitle": "Kostenlos", + "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 9dab09673..2a6f8047d 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -2135,9 +2135,10 @@ ], "comingSoonFeatures": ["Mail", "Photos"] }, - "1GB": { - "title": "Free", - "features": ["1GB of encrypted storage", "Encrypted VPN"] + "default": { + "freeTitle": "Free", + "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 d8b0db3d3..8a19a6800 100644 --- a/src/app/i18n/locales/es.json +++ b/src/app/i18n/locales/es.json @@ -2111,9 +2111,10 @@ ], "comingSoonFeatures": ["Mail", "Fotos"] }, - "1GB": { - "title": "Gratis", - "features": ["1GB de almacenamiento en la nube cifrado", "VPN cifrada"] + "default": { + "freeTitle": "Gratis", + "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 2e6d8b00a..875a5677b 100644 --- a/src/app/i18n/locales/fr.json +++ b/src/app/i18n/locales/fr.json @@ -2057,9 +2057,10 @@ ], "comingSoonFeatures": ["Mail", "Photos"] }, - "1GB": { - "title": "Gratuit", - "features": ["1Go de stockage cloud chiffré", "VPN Chiffré"] + "default": { + "freeTitle": "Gratuit", + "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 3f07c0a9f..c062a44a4 100644 --- a/src/app/i18n/locales/it.json +++ b/src/app/i18n/locales/it.json @@ -2164,9 +2164,10 @@ ], "comingSoonFeatures": ["Mail", "Foto"] }, - "1GB": { - "title": "Gratuito", - "features": ["1GB di spazio di archiviazione cloud crittografato", "VPN Crittografata"] + "default": { + "freeTitle": "Gratuito", + "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 647b13ca8..3d5efbf9a 100644 --- a/src/app/i18n/locales/ru.json +++ b/src/app/i18n/locales/ru.json @@ -2072,9 +2072,10 @@ ], "comingSoonFeatures": ["Mail (Почта)", "Фотографии"] }, - "1GB": { - "title": "Free (Бесплатный)", - "features": ["1 ГБ зашифрованного облачного хранилища", "Зашифрованный VPN"] + "default": { + "freeTitle": "Free (Бесплатный)", + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} зашифрованного облачного хранилища", "Зашифрованный VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/tw.json b/src/app/i18n/locales/tw.json index e6af4d31b..63a33fc2c 100644 --- a/src/app/i18n/locales/tw.json +++ b/src/app/i18n/locales/tw.json @@ -2062,9 +2062,10 @@ ], "comingSoonFeatures": ["郵件 (Mail)", "照片(Photos)"] }, - "1GB": { - "title": "Free (免費版)", - "features": ["1GB 加密雲端儲存空間", "加密 VPN"] + "default": { + "freeTitle": "Free (免費版)", + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} 加密雲端儲存空間", "加密 VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json index ecd732711..a0b6a6e35 100644 --- a/src/app/i18n/locales/zh.json +++ b/src/app/i18n/locales/zh.json @@ -2099,9 +2099,10 @@ ], "comingSoonFeatures": ["邮件 (Mail)", "照片 (Photos)"] }, - "1GB": { - "title": "Free (免费版)", - "features": ["1GB 加密云存储空间", "加密 VPN"] + "default": { + "freeTitle": "Free (免费版)", + "bytesTitle": "{{bytes}}", + "features": ["{{bytes}} 加密云存储空间", "加密 VPN"] } }, "businessPlanFeaturesList": { diff --git a/src/views/Checkout/components/CheckoutProductCard.tsx b/src/views/Checkout/components/CheckoutProductCard.tsx index 3b09ab0c6..fc62184cf 100644 --- a/src/views/Checkout/components/CheckoutProductCard.tsx +++ b/src/views/Checkout/components/CheckoutProductCard.tsx @@ -79,11 +79,18 @@ export const CheckoutProductCard = ({ const planType = isBusiness ? 'businessPlanFeaturesList' : '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 productLabel = + translate(specificTitleKey) === specificTitleKey + ? translate('preferences.account.plans.planFeaturesList.default.bytesTitle', { bytes }) + : translate(specificTitleKey); + + 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 cdec26209..24ed1830b 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`);