Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -2052,9 +2052,10 @@
],
"comingSoonFeatures": ["Mail", "Fotos"]
},
"1GB": {
"title": "Kostenlos",
"features": ["1GB verschlüsselter Cloud-Speicher", "Verschlüsseltes VPN"]
"default": {
"freeTitle": "Kostenlos",
Comment thread
CandelR marked this conversation as resolved.
Outdated
"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 @@ -2136,9 +2136,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 @@ -2112,9 +2112,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 @@ -2058,9 +2058,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 @@ -2165,9 +2165,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 @@ -2073,9 +2073,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 @@ -2063,9 +2063,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 @@ -2100,9 +2100,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 @@ -68,11 +68,18 @@ 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 productLabel =
translate(specificTitleKey) === specificTitleKey
Comment thread
CandelR marked this conversation as resolved.
Outdated
? 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