Skip to content

Commit

Permalink
[FIX] Marketplace tiered pricing plan wording (#17644)
Browse files Browse the repository at this point in the history
  • Loading branch information
geekgonecrazy authored May 14, 2020
1 parent c9e5302 commit 23f2f2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/apps/client/admin/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('_');
Expand Down
4 changes: 4 additions & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand Down

0 comments on commit 23f2f2e

Please sign in to comment.