diff --git a/src/languages/en.ts b/src/languages/en.ts index 3f17099c452e..62a72033d7fa 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -200,6 +200,7 @@ import type { WorkspaceLockedPlanTypeParams, WorkspaceMemberList, WorkspaceOwnerWillNeedToAddOrUpdatePaymentCardParams, + WorkspacePriceParams, WorkspaceYouMayJoin, YourPlanPriceParams, ZipCodeExampleFormatParams, @@ -4382,7 +4383,7 @@ const translations = { title: 'Upgrade to the Control plan', note: 'Unlock our most powerful features, including:', benefits: { - note: 'The Control plan starts at $9 per active member per month.', + note: ({price}: WorkspacePriceParams) => `The Control plan starts at ${price} per active member per month.`, learnMore: 'Learn more', pricing: 'about our plans and pricing.', benefit1: 'Advanced accounting connections (NetSuite, Sage Intacct, and more)', diff --git a/src/languages/es.ts b/src/languages/es.ts index 3de91d7d2a71..5d396476d2c3 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -200,6 +200,7 @@ import type { WorkspaceLockedPlanTypeParams, WorkspaceMemberList, WorkspaceOwnerWillNeedToAddOrUpdatePaymentCardParams, + WorkspacePriceParams, WorkspaceYouMayJoin, YourPlanPriceParams, ZipCodeExampleFormatParams, @@ -4448,7 +4449,7 @@ const translations = { title: 'Mejorar al plan Controlar', note: 'Desbloquea nuestras funciones más potentes, incluyendo:', benefits: { - note: 'El plan Controlar comienza desde $9 por miembro activo al mes.', + note: ({price}: WorkspacePriceParams) => `El plan Controlar comienza desde ${price} por miembro activo al mes.`, learnMore: 'Más información', pricing: 'sobre nuestros planes y precios.', benefit1: 'Conexiones avanzadas de contabilidad (NetSuite, Sage Intacct y más)', diff --git a/src/languages/params.ts b/src/languages/params.ts index 969706eeeb2f..b52c16d4a62e 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -294,6 +294,8 @@ type AccountOwnerParams = {accountOwnerEmail: string}; type ExportedToIntegrationParams = {label: string; markedManually?: boolean; inProgress?: boolean; lastModified?: string}; +type WorkspacePriceParams = {price: string}; + type IntegrationsMessageParams = { label: string; result: { @@ -724,6 +726,7 @@ export type { ReportArchiveReasonsClosedParams, ReportArchiveReasonsMergedParams, ReportPolicyNameParams, + WorkspacePriceParams, ReportArchiveReasonsInvoiceReceiverPolicyDeletedParams, ReportArchiveReasonsRemovedFromPolicyParams, RequestAmountParams, diff --git a/src/pages/workspace/upgrade/GenericFeaturesView.tsx b/src/pages/workspace/upgrade/GenericFeaturesView.tsx index c181af37f483..aa07710ec56f 100644 --- a/src/pages/workspace/upgrade/GenericFeaturesView.tsx +++ b/src/pages/workspace/upgrade/GenericFeaturesView.tsx @@ -15,9 +15,10 @@ type GenericFeaturesViewProps = { buttonDisabled?: boolean; loading?: boolean; onUpgrade: () => void; + formattedPrice: string; }; -function GenericFeaturesView({onUpgrade, buttonDisabled, loading}: GenericFeaturesViewProps) { +function GenericFeaturesView({onUpgrade, buttonDisabled, loading, formattedPrice}: GenericFeaturesViewProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const {isExtraSmallScreenWidth} = useResponsiveLayout(); @@ -51,7 +52,7 @@ function GenericFeaturesView({onUpgrade, buttonDisabled, loading}: GenericFeatur ))} - {translate('workspace.upgrade.commonFeatures.benefits.note')}{' '} + {translate('workspace.upgrade.commonFeatures.benefits.note', {price: formattedPrice})}{' '} Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION)} diff --git a/src/pages/workspace/upgrade/UpgradeIntro.tsx b/src/pages/workspace/upgrade/UpgradeIntro.tsx index a13519c87ad0..d61a617353f7 100644 --- a/src/pages/workspace/upgrade/UpgradeIntro.tsx +++ b/src/pages/workspace/upgrade/UpgradeIntro.tsx @@ -39,10 +39,11 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi const preferredCurrency = usePreferredCurrency(); const formattedPrice = React.useMemo(() => { - const upgradePlan = isCategorizing ? CONST.POLICY.TYPE.TEAM : CONST.POLICY.TYPE.CORPORATE; const upgradeCurrency = Object.hasOwn(CONST.SUBSCRIPTION_PRICES, preferredCurrency) ? preferredCurrency : CONST.PAYMENT_CARD_CURRENCY.USD; - const upgradePrice = CONST.SUBSCRIPTION_PRICES[upgradeCurrency][upgradePlan][CONST.SUBSCRIPTION.TYPE.ANNUAL]; - return `${convertToShortDisplayString(upgradePrice, upgradeCurrency)} `; + return convertToShortDisplayString( + CONST.SUBSCRIPTION_PRICES[upgradeCurrency][isCategorizing ? CONST.POLICY.TYPE.TEAM : CONST.POLICY.TYPE.CORPORATE][CONST.SUBSCRIPTION.TYPE.ANNUAL], + upgradeCurrency, + ); }, [preferredCurrency, isCategorizing]); if (!feature) { @@ -50,6 +51,7 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi ); @@ -87,7 +89,7 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi {translate(feature.description)} {translate(`workspace.upgrade.${feature.id}.onlyAvailableOnPlan`)} - {formattedPrice} + {`${formattedPrice} `} {translate(`workspace.upgrade.pricing.perActiveMember`)}