From 038bb6a2bb799f44f8f97a6ccc81fc3fbb3390db Mon Sep 17 00:00:00 2001 From: Ivy Gesare <83957195+Gesare5@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:11:30 +0300 Subject: [PATCH] [MM-60808] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx' with FormattedMessage (#28552) --- .../team_edition/team_edition_right_panel.tsx | 33 ++++++++++--------- webapp/channels/src/i18n/en.json | 10 +++--- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx b/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx index a07766cbf90..b4920647fd2 100644 --- a/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx +++ b/webapp/channels/src/components/admin_console/license_settings/team_edition/team_edition_right_panel.tsx @@ -2,14 +2,12 @@ // See LICENSE.txt for license information. import React from 'react'; -import {FormattedMessage} from 'react-intl'; +import {FormattedMessage, useIntl} from 'react-intl'; import WomanUpArrowsAndCloudsSvg from 'components/common/svg_images_components/woman_up_arrows_and_clouds_svg'; -import FormattedMarkdownMessage from 'components/formatted_markdown_message'; import LoadingWrapper from 'components/widgets/loading/loading_wrapper'; import {format} from 'utils/markdown'; -import {localizeMessage} from 'utils/utils'; interface TeamEditionRightPanelProps { upgradingPercentage: number; @@ -37,6 +35,8 @@ const TeamEditionRightPanel: React.FC = ({ setClickNormalUpgradeBtn, }: TeamEditionRightPanelProps) => { let upgradeButton = null; + const intl = useIntl(); + const onHandleUpgrade = (e: React.MouseEvent) => { if (!handleUpgrade) { return; @@ -77,21 +77,24 @@ const TeamEditionRightPanel: React.FC = ({

- {chunks}, + }} /> - -

@@ -114,8 +117,8 @@ const TeamEditionRightPanel: React.FC = ({ upgradeButton = (

-

@@ -127,13 +130,13 @@ const TeamEditionRightPanel: React.FC = ({ > diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 6ac4e39a6c9..d31c5951254 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -1361,11 +1361,8 @@ "admin.license.confirm-license-removal.subtitle": "Removing the license will downgrade your server from {currentSKU} to Free. You may lose information. ", "admin.license.confirm-license-removal.title": "Are you sure?", "admin.license.enterprise.license_required_upgrade": "A license is required to unlock enterprise features", - "admin.license.enterprise.restart": "Restart Server", "admin.license.enterprise.restarting": "Restarting", "admin.license.enterprise.upgrade": "Upgrade to Enterprise Edition", - "admin.license.enterprise.upgrade.acceptTermsFinal": ". Upgrading will download the binary and update your team edition.", - "admin.license.enterprise.upgrade.acceptTermsInitial": "By clicking **Upgrade**, I agree to the terms of the Mattermost ", "admin.license.enterprise.upgrade.eeLicenseLink": "Enterprise Edition License", "admin.license.enterprise.upgrading": "Upgrading {percentage}%", "admin.license.enterpriseEdition": "Enterprise Edition", @@ -1409,7 +1406,6 @@ "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 Upgrade Server And Start trial, I agree to the Mattermost Software Evaluation Agreement, Privacy Policy, and receiving product emails. ", "admin.license.upgrade-and-trial-request.title": "Upgrade to Enterprise Edition and Experience Mattermost Enterprise Edition for free for the next 30 days. No obligation to buy or credit card required. ", - "admin.license.upgraded-restart": "You have upgraded your binary to mattermost enterprise, please restart the server to start using the new binary. You can do it right here:", "admin.license.upgradeTitle": "Upgrade to the Professional Plan", "admin.license.upgradeToEnterprise": "Upgrade to the Enterprise plan", "admin.license.upgradeToEnterpriseGov": "Upgrade to the Enterprise Gov Plan", @@ -1419,6 +1415,12 @@ "admin.license.upload-modal.successfulUpgradeText": "You have upgraded to the {skuName} plan for {licensedUsersNum, number} seats. This is effective from {startsAt} until {expiresAt}. ", "admin.license.upload-modal.title": "Upload a License Key", "admin.license.uploadFile": "Upload File", + "admin.licenseSettings.teamEdition.teamEditionRightPanel.acceptTermsFinal": ". Upgrading will download the binary and update your team edition.", + "admin.licenseSettings.teamEdition.teamEditionRightPanel.acceptTermsInitial": "By clicking Upgrade, I agree to the terms of the Mattermost ", + "admin.licenseSettings.teamEdition.teamEditionRightPanel.eeLicenseLink": "Enterprise Edition License", + "admin.licenseSettings.teamEdition.teamEditionRightPanel.restart": "Restart Server", + "admin.licenseSettings.teamEdition.teamEditionRightPanel.restarting": "Restarting", + "admin.licenseSettings.teamEdition.teamEditionRightPanel.upgradedRestart": "You have upgraded your binary to mattermost enterprise, please restart the server to start using the new binary. You can do it right here:", "admin.lockTeammateNameDisplay": "Lock Teammate Name Display for all users: ", "admin.lockTeammateNameDisplayHelpText": "When true, disables users' ability to change settings under Settings > Display > Teammate Name Display.", "admin.log.AdvancedLoggingJSONDescription": "The JSON configuration for Advanced Logging. Please see documentation to learn more about Advanced Logging and the JSON format it uses.",