[MM-60809] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/admin_console/license_settings/trial_license_card/trial_license_card.tsx' with FormattedMessage (#28554)

* Change: Replace FormattedMarkdownMessage with FormattedMessage in trial_license_card.tsx
Change: Update en.json

* Change: Update message ids in trial_license_card

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Ivy Gesare 2024-10-11 12:19:43 +03:00 committed by GitHub
parent 4f496eedb5
commit bd1743192d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 9 deletions

View File

@ -9,7 +9,6 @@ import type {ClientLicense} from '@mattermost/types/config';
import AlertBanner from 'components/alert_banner';
import ContactUsButton from 'components/announcement_bar/contact_sales/contact_us';
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
import {daysToLicenseExpire} from 'utils/license_utils';
import {getBrowserTimezone} from 'utils/timezone';
@ -28,10 +27,11 @@ const TrialLicenseCard: React.FC<Props> = ({license}: Props) => {
const messageBody = () => {
if (currentDate.toDateString() === endDate.toDateString()) {
return (
<FormattedMarkdownMessage
id='admin.license.trialCard.description.expiringToday'
defaultMessage='Your free trial expires **Today at {time}**. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends'
<FormattedMessage
id='admin.license.trialLicenseCard.expiringToday'
defaultMessage='Your free trial expires <b>Today at {time}</b>. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends'
values={{
b: (chunks: string) => <b>{chunks}</b>,
time: moment(endDate).endOf('day').format('h:mm a ') + moment().tz(getBrowserTimezone()).format('z'),
}}
/>
@ -39,10 +39,11 @@ const TrialLicenseCard: React.FC<Props> = ({license}: Props) => {
}
return (
<FormattedMarkdownMessage
id='admin.license.trialCard.description'
defaultMessage='Your free trial will expire in **{daysCount} {daysCount, plural, one {day} other {days}}**. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends.'
<FormattedMessage
id='admin.license.trialLicenseCard.expiringAfterFewDays'
defaultMessage='Your free trial will expire in <b>{daysCount} {daysCount, plural, one {day} other {days}}</b>. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends.'
values={{
b: (chunks: string) => <b>{chunks}</b>,
daysCount: daysToEndLicense,
}}
/>

View File

@ -1403,10 +1403,10 @@
"admin.license.trial-request.startTrial": "Start trial",
"admin.license.trial-request.title": "Experience Mattermost Enterprise Edition for free for the next 30 days. No obligation to buy or credit card required. ",
"admin.license.trialCard.contactSales": "Contact sales",
"admin.license.trialCard.description": "Your free trial will expire in **{daysCount} {daysCount, plural, one {day} other {days}}**. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends.",
"admin.license.trialCard.description.expiringToday": "Your free trial expires **Today at {time}**. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends",
"admin.license.trialCard.licenseExpiring": "Youre currently on a free trial of our Mattermost Enterprise license.",
"admin.license.trialCard.purchase_license": "Purchase a license",
"admin.license.trialLicenseCard.expiringAfterFewDays": "Your free trial will expire in <b>{daysCount} {daysCount, plural, one {day} other {days}}</b>. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends.",
"admin.license.trialLicenseCard.expiringToday": "Your free trial expires <b>Today at {time}</b>. Visit our customer portal to purchase a license now to continue using Mattermost Professional and Enterprise features after trial ends",
"admin.license.trialUpgradeAndRequest.submit": "Upgrade Server And Start trial",
"admin.license.upgrade-and-trial-request.accept-terms-final-part": "Also, I agree to the terms of the Mattermost {eeModalTerms}. Upgrading will download the binary and update your Team Edition instance.",
"admin.license.upgrade-and-trial-request.accept-terms-initial-part": "By selecting <strong>Upgrade Server And Start trial</strong>, I agree to the <linkEvaluation>Mattermost Software Evaluation Agreement</linkEvaluation>, <linkPrivacy>Privacy Policy</linkPrivacy>, and receiving product emails. ",