Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Marketplace tiered pricing plan wording #17644

Merged
merged 2 commits into from
May 14, 2020
Merged
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
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