Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2072,9 +2072,10 @@
],
"comingSoonFeatures": ["Mail (Почта)", "Фотографии"]
},
"1GB": {
"title": "Free (Бесплатный)",
"features": ["1 ГБ зашифрованного облачного хранилища", "Зашифрованный VPN"]
"default": {
"freeTitle": "Free (Бесплатный)",
"bytesTitle": "{{bytes}}",
"features": ["{{bytes}} зашифрованного облачного хранилища", "Зашифрованный VPN"]
}
},
"businessPlanFeaturesList": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -2062,9 +2062,10 @@
],
"comingSoonFeatures": ["郵件 (Mail)", "照片(Photos)"]
},
"1GB": {
"title": "Free (免費版)",
"features": ["1GB 加密雲端儲存空間", "加密 VPN"]
"default": {
"freeTitle": "Free (免費版)",
"bytesTitle": "{{bytes}}",
"features": ["{{bytes}} 加密雲端儲存空間", "加密 VPN"]
}
},
"businessPlanFeaturesList": {
Expand Down
7 changes: 4 additions & 3 deletions src/app/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2099,9 +2099,10 @@
],
"comingSoonFeatures": ["邮件 (Mail)", "照片 (Photos)"]
},
"1GB": {
"title": "Free (免费版)",
"features": ["1GB 加密云存储空间", "加密 VPN"]
"default": {
"freeTitle": "Free (免费版)",
"bytesTitle": "{{bytes}}",
"features": ["{{bytes}} 加密云存储空间", "加密 VPN"]
}
},
"businessPlanFeaturesList": {
Expand Down
17 changes: 12 additions & 5 deletions src/views/Checkout/components/CheckoutProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`);

Expand Down
Loading