[MM-60854] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/admin_console/team_channel_settings/convert_confirm_modal.tsx' with FormattedMessage (#28733)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
df925a3e6b
Коммит
ad65b6b391
@@ -5,7 +5,6 @@ import React from 'react';
|
|||||||
import {FormattedMessage, defineMessages} from 'react-intl';
|
import {FormattedMessage, defineMessages} from 'react-intl';
|
||||||
|
|
||||||
import ConfirmModal from 'components/confirm_modal';
|
import ConfirmModal from 'components/confirm_modal';
|
||||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
@@ -39,14 +38,17 @@ const ConvertConfirmModal = ({show, onConfirm, onCancel, displayName, toPublic}:
|
|||||||
let titleMessage;
|
let titleMessage;
|
||||||
let convertMessage;
|
let convertMessage;
|
||||||
let confirmMessage;
|
let confirmMessage;
|
||||||
|
let convertConfirmationMessage;
|
||||||
if (toPublic) {
|
if (toPublic) {
|
||||||
titleMessage = messages.toPublicTitle;
|
titleMessage = messages.toPublicTitle;
|
||||||
convertMessage = messages.toPublicMessage;
|
convertMessage = messages.toPublicMessage;
|
||||||
confirmMessage = messages.toPublicConfirm;
|
confirmMessage = messages.toPublicConfirm;
|
||||||
|
convertConfirmationMessage = messages.toPublicMessageConfirmation;
|
||||||
} else {
|
} else {
|
||||||
titleMessage = messages.toPrivateTitle;
|
titleMessage = messages.toPrivateTitle;
|
||||||
convertMessage = messages.toPrivateMessage;
|
convertMessage = messages.toPrivateMessage;
|
||||||
confirmMessage = messages.toPrivateConfirm;
|
confirmMessage = messages.toPrivateConfirm;
|
||||||
|
convertConfirmationMessage = messages.toPrivateMessageConfirmation;
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = (
|
const title = (
|
||||||
@@ -57,10 +59,20 @@ const ConvertConfirmModal = ({show, onConfirm, onCancel, displayName, toPublic}:
|
|||||||
);
|
);
|
||||||
|
|
||||||
const message = (
|
const message = (
|
||||||
<FormattedMarkdownMessage
|
<>
|
||||||
{...convertMessage}
|
<p>
|
||||||
values={{displayName}}
|
<FormattedMessage
|
||||||
/>
|
{...convertMessage}
|
||||||
|
values={{displayName: <strong>{displayName}</strong>}}
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<FormattedMessage
|
||||||
|
{...convertConfirmationMessage}
|
||||||
|
values={{displayName: <strong>{displayName}</strong>}}
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
const confirmButton = (
|
const confirmButton = (
|
||||||
@@ -100,10 +112,11 @@ const messages = defineMessages({
|
|||||||
},
|
},
|
||||||
toPrivateMessage: {
|
toPrivateMessage: {
|
||||||
id: 'admin.team_channel_settings.convertConfirmModal.toPrivateMessage',
|
id: 'admin.team_channel_settings.convertConfirmModal.toPrivateMessage',
|
||||||
|
defaultMessage: 'When you convert {displayName} to a private channel, history and membership are preserved. Publicly shared files remain accessible to anyone with the link. Membership in a private channel is by invitation only.',
|
||||||
// This eslint-disable comment can be removed once this component no longer uses FormattedMarkdownMessage
|
},
|
||||||
// eslint-disable-next-line formatjs/no-multiple-whitespaces
|
toPrivateMessageConfirmation: {
|
||||||
defaultMessage: 'When you convert **{displayName}** to a private channel, history and membership are preserved. Publicly shared files remain accessible to anyone with the link. Membership in a private channel is by invitation only. \n \nAre you sure you want to convert **{displayName}** to a private channel?',
|
id: 'admin.team_channel_settings.convertConfirmModal.toPrivateMessageConfirmation',
|
||||||
|
defaultMessage: 'Are you sure you want to convert {displayName} to a private channel?',
|
||||||
},
|
},
|
||||||
toPrivateTitle: {
|
toPrivateTitle: {
|
||||||
id: 'admin.team_channel_settings.convertConfirmModal.toPrivateTitle',
|
id: 'admin.team_channel_settings.convertConfirmModal.toPrivateTitle',
|
||||||
@@ -115,10 +128,11 @@ const messages = defineMessages({
|
|||||||
},
|
},
|
||||||
toPublicMessage: {
|
toPublicMessage: {
|
||||||
id: 'admin.team_channel_settings.convertConfirmModal.toPublicMessage',
|
id: 'admin.team_channel_settings.convertConfirmModal.toPublicMessage',
|
||||||
|
defaultMessage: 'When you convert {displayName} to a public channel, history and membership are preserved. Public channels are discoverable and can be joined by users on the system without invitation.',
|
||||||
// This eslint-disable comment can be removed once this component no longer uses FormattedMarkdownMessage
|
},
|
||||||
// eslint-disable-next-line formatjs/no-multiple-whitespaces
|
toPublicMessageConfirmation: {
|
||||||
defaultMessage: 'When you convert **{displayName}** to a public channel, history and membership are preserved. Public channels are discoverable and can by joined by users on the system without invitation. \n \nAre you sure you want to convert **{displayName}** to a public channel?',
|
id: 'admin.team_channel_settings.convertConfirmModal.toPublicMessageConfirmation',
|
||||||
|
defaultMessage: 'Are you sure you want to convert {displayName} to a public channel?',
|
||||||
},
|
},
|
||||||
toPublicTitle: {
|
toPublicTitle: {
|
||||||
id: 'admin.team_channel_settings.convertConfirmModal.toPublicTitle',
|
id: 'admin.team_channel_settings.convertConfirmModal.toPublicTitle',
|
||||||
|
|||||||
@@ -2620,10 +2620,12 @@
|
|||||||
"admin.team_channel_settings.convertAndRemoveConfirmModal.toPublicTitle": "Convert channel to public and remove {amount, number} {amount, plural, one {user} other {users}}",
|
"admin.team_channel_settings.convertAndRemoveConfirmModal.toPublicTitle": "Convert channel to public and remove {amount, number} {amount, plural, one {user} other {users}}",
|
||||||
"admin.team_channel_settings.convertConfirmModal.cancel": "No, cancel",
|
"admin.team_channel_settings.convertConfirmModal.cancel": "No, cancel",
|
||||||
"admin.team_channel_settings.convertConfirmModal.toPrivateConfirm": "Yes, convert to private channel",
|
"admin.team_channel_settings.convertConfirmModal.toPrivateConfirm": "Yes, convert to private channel",
|
||||||
"admin.team_channel_settings.convertConfirmModal.toPrivateMessage": "When you convert **{displayName}** to a private channel, history and membership are preserved. Publicly shared files remain accessible to anyone with the link. Membership in a private channel is by invitation only. \n \nAre you sure you want to convert **{displayName}** to a private channel?",
|
"admin.team_channel_settings.convertConfirmModal.toPrivateMessage": "When you convert {displayName} to a private channel, history and membership are preserved. Publicly shared files remain accessible to anyone with the link. Membership in a private channel is by invitation only.",
|
||||||
|
"admin.team_channel_settings.convertConfirmModal.toPrivateMessageConfirmation": "Are you sure you want to convert {displayName} to a private channel?",
|
||||||
"admin.team_channel_settings.convertConfirmModal.toPrivateTitle": "Convert {displayName} to a private channel?",
|
"admin.team_channel_settings.convertConfirmModal.toPrivateTitle": "Convert {displayName} to a private channel?",
|
||||||
"admin.team_channel_settings.convertConfirmModal.toPublicConfirm": "Yes, convert to public channel",
|
"admin.team_channel_settings.convertConfirmModal.toPublicConfirm": "Yes, convert to public channel",
|
||||||
"admin.team_channel_settings.convertConfirmModal.toPublicMessage": "When you convert **{displayName}** to a public channel, history and membership are preserved. Public channels are discoverable and can by joined by users on the system without invitation. \n \nAre you sure you want to convert **{displayName}** to a public channel?",
|
"admin.team_channel_settings.convertConfirmModal.toPublicMessage": "When you convert {displayName} to a public channel, history and membership are preserved. Public channels are discoverable and can be joined by users on the system without invitation.",
|
||||||
|
"admin.team_channel_settings.convertConfirmModal.toPublicMessageConfirmation": "Are you sure you want to convert {displayName} to a public channel?",
|
||||||
"admin.team_channel_settings.convertConfirmModal.toPublicTitle": "Convert {displayName} to a public channel?",
|
"admin.team_channel_settings.convertConfirmModal.toPublicTitle": "Convert {displayName} to a public channel?",
|
||||||
"admin.team_channel_settings.group_list.membersHeader": "Member Count",
|
"admin.team_channel_settings.group_list.membersHeader": "Member Count",
|
||||||
"admin.team_channel_settings.group_list.nameHeader": "Group Name",
|
"admin.team_channel_settings.group_list.nameHeader": "Group Name",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user