[MM-60836] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/admin_console/message_export_settings.tsx' with FormattedMessage (#28635)

Этот коммит содержится в:
Zubair Imtiaz
2024-10-11 18:08:48 +05:00
коммит произвёл GitHub
родитель 199eae09bb
Коммит 87ac98c524
3 изменённых файлов: 109 добавлений и 57 удалений

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

@@ -67,17 +67,25 @@ exports[`components/MessageExportSettings should match snapshot, disabled, actia
<Memo(DropdownSetting)
disabled={true}
helpText={
<FormattedMarkdownMessage
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into.{lineBreak} {lineBreak}For Actiance XML, compliance export files are written to the exports subdirectory of the configured [Local Storage Directory]({url}). For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormat.description"
values={
Object {
"lineBreak": "
",
"url": "http://localhost:8065/admin_console/environment/file_storage",
}
}
/>
<React.Fragment>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into."
id="admin.complianceExport.exportFormatDetail.intro"
/>
</p>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="For Actiance XML, compliance export files are written to the exports subdirectory of the configured <a>Local Storage Directory</a>. For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormatDetail.details"
values={
Object {
"a": [Function],
}
}
/>
</p>
</React.Fragment>
}
id="exportFormat"
label={
@@ -223,17 +231,25 @@ exports[`components/MessageExportSettings should match snapshot, disabled, globa
<Memo(DropdownSetting)
disabled={true}
helpText={
<FormattedMarkdownMessage
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into.{lineBreak} {lineBreak}For Actiance XML, compliance export files are written to the exports subdirectory of the configured [Local Storage Directory]({url}). For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormat.description"
values={
Object {
"lineBreak": "
",
"url": "http://localhost:8065/admin_console/environment/file_storage",
}
}
/>
<React.Fragment>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into."
id="admin.complianceExport.exportFormatDetail.intro"
/>
</p>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="For Actiance XML, compliance export files are written to the exports subdirectory of the configured <a>Local Storage Directory</a>. For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormatDetail.details"
values={
Object {
"a": [Function],
}
}
/>
</p>
</React.Fragment>
}
id="exportFormat"
label={
@@ -493,17 +509,25 @@ exports[`components/MessageExportSettings should match snapshot, enabled, actian
<Memo(DropdownSetting)
disabled={false}
helpText={
<FormattedMarkdownMessage
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into.{lineBreak} {lineBreak}For Actiance XML, compliance export files are written to the exports subdirectory of the configured [Local Storage Directory]({url}). For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormat.description"
values={
Object {
"lineBreak": "
",
"url": "http://localhost:8065/admin_console/environment/file_storage",
}
}
/>
<React.Fragment>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into."
id="admin.complianceExport.exportFormatDetail.intro"
/>
</p>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="For Actiance XML, compliance export files are written to the exports subdirectory of the configured <a>Local Storage Directory</a>. For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormatDetail.details"
values={
Object {
"a": [Function],
}
}
/>
</p>
</React.Fragment>
}
id="exportFormat"
label={
@@ -649,17 +673,25 @@ exports[`components/MessageExportSettings should match snapshot, enabled, global
<Memo(DropdownSetting)
disabled={false}
helpText={
<FormattedMarkdownMessage
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into.{lineBreak} {lineBreak}For Actiance XML, compliance export files are written to the exports subdirectory of the configured [Local Storage Directory]({url}). For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormat.description"
values={
Object {
"lineBreak": "
",
"url": "http://localhost:8065/admin_console/environment/file_storage",
}
}
/>
<React.Fragment>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="Format of the compliance export. Corresponds to the system that you want to import the data into."
id="admin.complianceExport.exportFormatDetail.intro"
/>
</p>
<p>
<Memo(MemoizedFormattedMessage)
defaultMessage="For Actiance XML, compliance export files are written to the exports subdirectory of the configured <a>Local Storage Directory</a>. For Global Relay EML, they are emailed to the configured email address."
id="admin.complianceExport.exportFormatDetail.details"
values={
Object {
"a": [Function],
}
}
/>
</p>
</React.Fragment>
}
id="exportFormat"
label={

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

@@ -5,15 +5,14 @@ import React from 'react';
import type {ReactNode} from 'react';
import type {MessageDescriptor, WrappedComponentProps} from 'react-intl';
import {FormattedMessage, defineMessage, defineMessages, injectIntl} from 'react-intl';
import {Link} from 'react-router-dom';
import type {AdminConfig} from '@mattermost/types/config';
import type {Job} from '@mattermost/types/jobs';
import ExternalLink from 'components/external_link';
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
import {DocLinks, JobTypes, exportFormats} from 'utils/constants';
import {getSiteURL} from 'utils/url';
import type {BaseProps, BaseState} from './admin_settings';
import AdminSettings from './admin_settings';
@@ -51,13 +50,21 @@ const messages = defineMessages({
exportJobStartTime_title: {id: 'admin.complianceExport.exportJobStartTime.title', defaultMessage: 'Compliance Export Time:'},
exportJobStartTime_description: {id: 'admin.complianceExport.exportJobStartTime.description', defaultMessage: 'Set the start time of the daily scheduled compliance export job. Choose a time when fewer people are using your system. Must be a 24-hour time stamp in the form HH:MM.'},
exportFormat_title: {id: 'admin.complianceExport.exportFormat.title', defaultMessage: 'Export Format:'},
exportFormat_description: {id: 'admin.complianceExport.exportFormat.description', defaultMessage: 'Format of the compliance export. Corresponds to the system that you want to import the data into.{lineBreak} {lineBreak}For Actiance XML, compliance export files are written to the exports subdirectory of the configured [Local Storage Directory]({url}). For Global Relay EML, they are emailed to the configured email address.'},
exportFormat_description_intro: {
id: 'admin.complianceExport.exportFormatDetail.intro',
defaultMessage: 'Format of the compliance export. Corresponds to the system that you want to import the data into.'},
exportFormat_description_details: {
id: 'admin.complianceExport.exportFormatDetail.details',
defaultMessage: 'For Actiance XML, compliance export files are written to the exports subdirectory of the configured <a>Local Storage Directory</a>. For Global Relay EML, they are emailed to the configured email address.'},
createJob_title: {id: 'admin.complianceExport.createJob.title', defaultMessage: 'Run Compliance Export Job Now'},
createJob_help: {id: 'admin.complianceExport.createJob.help', defaultMessage: 'Initiates a Compliance Export job immediately.'},
});
export const searchableStrings: Array<string|MessageDescriptor|[MessageDescriptor, {[key: string]: any}]> = [
[messages.exportFormat_description, {siteURL: ''}],
export const searchableStrings: Array<
string | MessageDescriptor | [MessageDescriptor, { [key: string]: any }]
> = [
messages.exportFormat_description_intro,
messages.exportFormat_description_details,
messages.complianceExportTitle,
messages.complianceExportDesc,
messages.exportJobStartTime_title,
@@ -308,13 +315,25 @@ export class MessageExportSettings extends AdminSettings<BaseProps & WrappedComp
}
const dropdownHelpText = (
<FormattedMarkdownMessage
{...messages.exportFormat_description}
values={{
url: `${getSiteURL()}/admin_console/environment/file_storage`,
lineBreak: '\n',
}}
/>
<>
<p>
<FormattedMessage
{...messages.exportFormat_description_intro}
/>
</p>
<p>
<FormattedMessage
{...messages.exportFormat_description_details}
values={{
a: (chunks: string) => (
<Link to='/admin_console/environment/file_storage'>
{chunks}
</Link>
),
}}
/>
</p>
</>
);
return (

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

@@ -584,9 +584,10 @@
"admin.complianceExport.createJob.title": "Run Compliance Export Job Now",
"admin.complianceExport.exportFormat.actiance": "Actiance XML",
"admin.complianceExport.exportFormat.csv": "CSV",
"admin.complianceExport.exportFormat.description": "Format of the compliance export. Corresponds to the system that you want to import the data into.\n \nFor Actiance XML, compliance export files are written to the \"exports\" subdirectory of the configured [Local Storage Directory]({siteURL}/admin_console/environment/file_storage). For Global Relay EML, they are emailed to the configured email address.",
"admin.complianceExport.exportFormat.globalrelay": "Global Relay EML",
"admin.complianceExport.exportFormat.title": "Export Format:",
"admin.complianceExport.exportFormatDetail.details": "For Actiance XML, compliance export files are written to the exports subdirectory of the configured <a>Local Storage Directory</a>. For Global Relay EML, they are emailed to the configured email address.",
"admin.complianceExport.exportFormatDetail.intro": "Format of the compliance export. Corresponds to the system that you want to import the data into.",
"admin.complianceExport.exportJobStartTime.description": "Set the start time of the daily scheduled compliance export job. Choose a time when fewer people are using your system. Must be a 24-hour time stamp in the form HH:MM.",
"admin.complianceExport.exportJobStartTime.example": "E.g.: \"02:00\"",
"admin.complianceExport.exportJobStartTime.title": "Compliance Export time:",