From 23f2f2e505d1f9b89c22b92fcbb1844786915d1a Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Thu, 14 May 2020 17:46:38 -0500 Subject: [PATCH] [FIX] Marketplace tiered pricing plan wording (#17644) --- app/apps/client/admin/helpers.js | 3 ++- packages/rocketchat-i18n/i18n/en.i18n.json | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/apps/client/admin/helpers.js b/app/apps/client/admin/helpers.js index f78b4c661599..a1b0b2cdf9c5 100644 --- a/app/apps/client/admin/helpers.js +++ b/app/apps/client/admin/helpers.js @@ -363,11 +363,12 @@ export const appStatusSpanProps = ({ export const formatPrice = (price) => `\$${ Number.parseFloat(price).toFixed(2) }`; -export const formatPricingPlan = ({ strategy, price, tiers }) => { +export const formatPricingPlan = ({ strategy, price, tiers = [] }) => { const { perUnit = false } = (Array.isArray(tiers) && tiers.find((tier) => tier.price === price)) || {}; const pricingPlanTranslationString = [ 'Apps_Marketplace_pricingPlan', + Array.isArray(tiers) && tiers.length > 0 && 'startingAt', strategy, perUnit && 'perUser', ].filter(Boolean).join('_'); diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index 21b98b73de81..00c5277b5433 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -409,9 +409,13 @@ "Apps_Marketplace_Login_Required_Title": "Marketplace Login Required", "Apps_Marketplace_Login_Required_Description": "Purchasing apps from the Rocket.Chat Marketplace requires registering your workspace and logging in.", "Apps_Marketplace_pricingPlan_monthly": "__price__ / month", + "Apps_Marketplace_pricingPlan_startingAt_monthly": "starting at __price__ / month", "Apps_Marketplace_pricingPlan_monthly_perUser": "__price__ / month per user", + "Apps_Marketplace_pricingPlan_startingAt_monthly_perUser": "starting at __price__ / month per user", "Apps_Marketplace_pricingPlan_yearly": "__price__ / year", + "Apps_Marketplace_pricingPlan_startingAt_yearly": "starting at __price__ / year", "Apps_Marketplace_pricingPlan_yearly_perUser": "__price__ / year per user", + "Apps_Marketplace_pricingPlan_startingAt_yearly_perUser": "starting at __price__ / year per user", "Apps_Settings": "App's Settings", "Apps_User_Already_Exists": "The username \"__username__\" is already being used. Rename or remove the user using it to install this App", "Apps_WhatIsIt": "Apps: What Are They?",