[MM-60858] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/commercial_support_modal/commercial_support_modal.tsx' with FormattedMessage (#28737)

Этот коммит содержится в:
Aditi Patel
2024-10-17 05:29:15 -05:00
коммит произвёл GitHub
родитель 9ae2752593
Коммит 347ca15f8d
3 изменённых файлов: 48 добавлений и 26 удалений

Просмотреть файл

@@ -51,20 +51,26 @@ exports[`components/CommercialSupportModal should match snapshot 1`] = `
<div <div
className="CommercialSupportModal" className="CommercialSupportModal"
> >
<FormattedMarkdownMessage <MemoizedFormattedMessage
defaultMessage="If you're experiencing issues, [submit a support ticket](!{supportLink}). To help with troubleshooting, it's recommended to download the Support Packet below that includes more details about your Mattermost environment." defaultMessage="If you're experiencing issues, <supportLink>submit a support ticket</supportLink>. To help with troubleshooting, it's recommended to download the Support Packet below that includes more details about your Mattermost environment."
id="commercial_support.description" id="commercial_support_modal.description"
values={ values={
Object { Object {
"supportLink": "https://support.mattermost.com/hc/en-us/requests/new", "supportLink": [Function],
} }
} }
/> />
<AlertBanner <AlertBanner
message={ message={
<FormattedMarkdownMessage <Memo(MemoizedFormattedMessage)
defaultMessage="Before downloading the Support Packet, set **Output Logs to File** to **true** and set **File Log Level** to **DEBUG** [here](!/admin_console/environment/logging)." defaultMessage="Before downloading the Support Packet, set <strong>Output Logs to File</strong> to <strong>true</strong> and set <strong>File Log Level</strong> to <strong>DEBUG</strong> <debugLink>here</debugLink>."
id="commercial_support.warning.banner" id="commercial_support_modal.warning.banner"
values={
Object {
"debugLink": [Function],
"strong": [Function],
}
}
/> />
} }
mode="info" mode="info"
@@ -73,10 +79,12 @@ exports[`components/CommercialSupportModal should match snapshot 1`] = `
<div <div
className="CommercialSupportModal__packet_contents_download" className="CommercialSupportModal__packet_contents_download"
> >
<FormattedMarkdownMessage <strong>
defaultMessage="**Select your Support Packet contents to download**" <MemoizedFormattedMessage
id="commercial_support.download_contents" defaultMessage="Select your Support Packet contents to download"
/> id="commercial_support_modal.download_contents"
/>
</strong>
</div> </div>
<div <div
className="CommercialSupportModal__download" className="CommercialSupportModal__download"

Просмотреть файл

@@ -5,6 +5,7 @@ import moment from 'moment';
import React from 'react'; import React from 'react';
import {Modal} from 'react-bootstrap'; import {Modal} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl'; import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router-dom';
import type {SupportPacketContent} from '@mattermost/types/admin'; import type {SupportPacketContent} from '@mattermost/types/admin';
import type {UserProfile} from '@mattermost/types/users'; import type {UserProfile} from '@mattermost/types/users';
@@ -12,7 +13,7 @@ import type {UserProfile} from '@mattermost/types/users';
import {Client4} from 'mattermost-redux/client'; import {Client4} from 'mattermost-redux/client';
import AlertBanner from 'components/alert_banner'; import AlertBanner from 'components/alert_banner';
import FormattedMarkdownMessage from 'components/formatted_markdown_message'; import ExternalLink from 'components/external_link';
import LoadingSpinner from 'components/widgets/loading/loading_spinner'; import LoadingSpinner from 'components/widgets/loading/loading_spinner';
import './commercial_support_modal.scss'; import './commercial_support_modal.scss';
@@ -145,30 +146,43 @@ export default class CommercialSupportModal extends React.PureComponent<Props, S
</Modal.Header> </Modal.Header>
<Modal.Body> <Modal.Body>
<div className='CommercialSupportModal'> <div className='CommercialSupportModal'>
<FormattedMarkdownMessage <FormattedMessage
id='commercial_support.description' id='commercial_support_modal.description'
defaultMessage={'If you\'re experiencing issues, [submit a support ticket](!{supportLink}). To help with troubleshooting, it\'s recommended to download the Support Packet below that includes more details about your Mattermost environment.'} defaultMessage={'If you\'re experiencing issues, <supportLink>submit a support ticket</supportLink>. To help with troubleshooting, it\'s recommended to download the Support Packet below that includes more details about your Mattermost environment.'}
values={{ values={{
supportLink, supportLink: (chunks: string) => (
<ExternalLink
href={supportLink}
location='commercialSupportModal'
>
{chunks}
</ExternalLink>
),
}} }}
/> />
{showBannerWarning && {showBannerWarning &&
<AlertBanner <AlertBanner
mode='info' mode='info'
message={ message={
<FormattedMarkdownMessage <FormattedMessage
id='commercial_support.warning.banner' id='commercial_support_modal.warning.banner'
defaultMessage='Before downloading the Support Packet, set **Output Logs to File** to **true** and set **File Log Level** to **DEBUG** [here](!/admin_console/environment/logging).' defaultMessage='Before downloading the Support Packet, set <strong>Output Logs to File</strong> to <strong>true</strong> and set <strong>File Log Level</strong> to <strong>DEBUG</strong> <debugLink>here</debugLink>.'
values={{
strong: (chunks: string) => <strong>{chunks}</strong>,
debugLink: (chunks: string) => <Link to='/admin_console/environment/logging'>{chunks}</Link>,
}}
/> />
} }
onDismiss={this.hideBannerWarning} onDismiss={this.hideBannerWarning}
/> />
} }
<div className='CommercialSupportModal__packet_contents_download'> <div className='CommercialSupportModal__packet_contents_download'>
<FormattedMarkdownMessage <strong>
id='commercial_support.download_contents' <FormattedMessage
defaultMessage={'**Select your Support Packet contents to download**'} id='commercial_support_modal.download_contents'
/> defaultMessage={'Select your Support Packet contents to download'}
/>
</strong>
</div> </div>
{this.state.packetContents.map((item, index) => ( {this.state.packetContents.map((item, index) => (
<div <div

Просмотреть файл

@@ -3401,11 +3401,11 @@
"combined_system_message.removed_from_team.one_you": "You were **removed from the team**.", "combined_system_message.removed_from_team.one_you": "You were **removed from the team**.",
"combined_system_message.removed_from_team.two": "{firstUser} and {secondUser} were **removed from the team**.", "combined_system_message.removed_from_team.two": "{firstUser} and {secondUser} were **removed from the team**.",
"combined_system_message.you": "You", "combined_system_message.you": "You",
"commercial_support.description": "If you're experiencing issues, [submit a support ticket](!{supportLink}). To help with troubleshooting, it's recommended to download the Support Packet below that includes more details about your Mattermost environment.", "commercial_support_modal.description": "If you're experiencing issues, <a>submit a support ticket</a>. To help with troubleshooting, it's recommended to download the Support Packet below that includes more details about your Mattermost environment.",
"commercial_support.download_contents": "**Select your Support Packet contents to download**", "commercial_support_modal.download_contents": "Select your Support Packet contents to download",
"commercial_support_modal.warning.banner": "Before downloading the Support Packet, set <strong>Output Logs to File</strong> to <strong>true</strong> and set <strong>File Log Level</strong> to <strong>DEBUG</strong> <a>here</a>.",
"commercial_support.download_support_packet": "Download Support Packet", "commercial_support.download_support_packet": "Download Support Packet",
"commercial_support.title": "Commercial Support", "commercial_support.title": "Commercial Support",
"commercial_support.warning.banner": "Before downloading the Support Packet, set **Output Logs to File** to **true** and set **File Log Level** to **DEBUG** [here](!/admin_console/environment/logging).",
"confirm_modal.cancel": "Cancel", "confirm_modal.cancel": "Cancel",
"confirm_switch_to_yearly_modal.confirm": "Confirm", "confirm_switch_to_yearly_modal.confirm": "Confirm",
"confirm_switch_to_yearly_modal.contact_sales": "Contact Sales", "confirm_switch_to_yearly_modal.contact_sales": "Contact Sales",