import CheckIcon from '../../../components/icons-components/CheckIcon';
import RecommendedIcon from '../../../components/icons-components/RecommendedIcon';
import { Alert } from '../../../components/ui/Alert';
-import { formatPrice } from '../organization/utils';
-import { translate } from '../../../helpers/l10n';
+import { formatPrice, TRIAL_DURATION_DAYS } from '../organization/utils';
+import { translate, translateWithParameters } from '../../../helpers/l10n';
import * as theme from '../../../app/theme';
import './CardPlan.css';
translate('billing.upgrade_box.unlimited_private_projects'),
translate('billing.upgrade_box.strict_control_private_data'),
translate('billing.upgrade_box.cancel_anytime'),
- translate('billing.upgrade_box.free_trial')
+ <strong key="trial">
+ {translateWithParameters('billing.upgrade_box.free_trial_x', TRIAL_DURATION_DAYS)}
+ </strong>
];
return (
<ul className="note">
{advantages.map((text, idx) => (
<li className="display-flex-center" key={idx}>
- <CheckIcon className="spacer-right" fill={theme.green} />
+ <CheckIcon className="spacer-right" fill={theme.lightGreen} />
{text}
</li>
))}
</ul>
<div className="big-spacer-left">
<Link className="spacer-left" target="_blank" to="/documentation/sonarcloud-pricing/">
- {translate('learn_more')}
+ {translate('billing.pricing.learn_more')}
</Link>
</div>
</>
>
<CheckIcon
className="spacer-right"
- fill="#00aa00"
+ fill="#b0d513"
/>
billing.upgrade_box.unlimited_private_projects
</li>
>
<CheckIcon
className="spacer-right"
- fill="#00aa00"
+ fill="#b0d513"
/>
billing.upgrade_box.strict_control_private_data
</li>
>
<CheckIcon
className="spacer-right"
- fill="#00aa00"
+ fill="#b0d513"
/>
billing.upgrade_box.cancel_anytime
</li>
>
<CheckIcon
className="spacer-right"
- fill="#00aa00"
+ fill="#b0d513"
/>
- billing.upgrade_box.free_trial
+ <strong
+ key="trial"
+ >
+ billing.upgrade_box.free_trial_x.14
+ </strong>
</li>
</ul>
<div
target="_blank"
to="/documentation/sonarcloud-pricing/"
>
- learn_more
+ billing.pricing.learn_more
</Link>
</div>
</CardPlan>
}
export default function UpgradeOrganizationBox({ organization }: Props) {
+ if (!hasMessage('billing.upgrade_box.button')) {
+ return null;
+ }
return (
<div className="boxed-group boxed-group-inner upgrade-organization-box">
<h3 className="spacer-bottom">{translate('billing.upgrade_box.header')}</h3>
-
<p>{translate('billing.upgrade_box.text')}</p>
-
- {hasMessage('billing.upgrade_box.button') && (
- <div className="big-spacer-top">
- <Link
- className="button"
- to={{
- pathname: `organizations/${organization}/extension/billing/billing`,
- query: { page: 'upgrade' }
- }}>
- {translate('billing.upgrade_box.button')}
- </Link>
- </div>
- )}
+ <div className="big-spacer-top">
+ <Link
+ className="button"
+ to={{
+ pathname: `organizations/${organization}/extension/billing/billing`,
+ query: { page: 'upgrade' }
+ }}>
+ {translate('billing.upgrade_box.button')}
+ </Link>
+ </div>
</div>
);
}