mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-60824] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/leave_team_modal/leave_team_modal.tsx' with FormattedMessage (#28547)
This commit is contained in:
parent
2780b87d00
commit
7895000ab7
@ -52,13 +52,13 @@ exports[`components/LeaveTeamModal should render the leave team model 1`] = `
|
||||
bsClass="modal-body"
|
||||
componentClass="div"
|
||||
>
|
||||
<FormattedMarkdownMessage
|
||||
defaultMessage="**You will be removed from {num_of_private_channels} private {num_of_private_channels,one {channel} other {channels}} on this team.** If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
id="leave_team_modal_private.desc"
|
||||
<MemoizedFormattedMessage
|
||||
defaultMessage="<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
id="leave_team_modal_private.description"
|
||||
values={
|
||||
Object {
|
||||
"num_of_private_channels": 0,
|
||||
"num_of_public_channels": 0,
|
||||
"strong": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
@ -9,8 +9,6 @@ import type {UserProfile} from '@mattermost/types/users';
|
||||
|
||||
import * as UserUtils from 'mattermost-redux/utils/user_utils';
|
||||
|
||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
||||
|
||||
import Constants from 'utils/constants';
|
||||
import {isKeyPressed} from 'utils/keyboard';
|
||||
|
||||
@ -83,66 +81,70 @@ export default class LeaveTeamModal extends React.PureComponent<Props, State> {
|
||||
if (isGuest) {
|
||||
if (numOfPublicChannels !== 0 && numOfPrivateChannels !== 0) {
|
||||
modalMessage = (
|
||||
<FormattedMarkdownMessage
|
||||
id='leave_team_modal_guest.desc'
|
||||
defaultMessage="** You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private { num_of_private_channels,plural,one {channel} other {channels}} on this team.** You won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
<FormattedMessage
|
||||
id='leave_team_modal_guest.description'
|
||||
defaultMessage='<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?'
|
||||
values={{
|
||||
num_of_public_channels: numOfPublicChannels,
|
||||
num_of_private_channels: numOfPrivateChannels,
|
||||
strong: (chunks: React.ReactNode) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else if (numOfPublicChannels === 0) {
|
||||
modalMessage = (
|
||||
<FormattedMarkdownMessage
|
||||
id='leave_team_modal_guest_only_private.desc'
|
||||
defaultMessage="** You will be removed from {num_of_private_channels} private { num_of_private_channels,plural,one {channel} other {channels}} on this team.** You won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
<FormattedMessage
|
||||
id='leave_team_modal_guest_only_private.description'
|
||||
defaultMessage='<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?'
|
||||
values={{
|
||||
num_of_public_channels: numOfPublicChannels,
|
||||
num_of_private_channels: numOfPrivateChannels,
|
||||
strong: (chunks: React.ReactNode) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
modalMessage = (
|
||||
<FormattedMarkdownMessage
|
||||
id='leave_team_modal_guest_only_public.desc'
|
||||
defaultMessage="** You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels}} on this team.** You won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
<FormattedMessage
|
||||
id='leave_team_modal_guest_only_public.description'
|
||||
defaultMessage='<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?'
|
||||
values={{
|
||||
num_of_public_channels: numOfPublicChannels,
|
||||
num_of_private_channels: numOfPrivateChannels,
|
||||
strong: (chunks: React.ReactNode) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>);
|
||||
/>
|
||||
);
|
||||
}
|
||||
} else if (numOfPublicChannels !== 0 && numOfPrivateChannels !== 0) {
|
||||
modalMessage = (
|
||||
<FormattedMarkdownMessage
|
||||
id='leave_team_modal.desc'
|
||||
defaultMessage="**You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels} } and {num_of_private_channels} private {num_of_private_channels,one {channel} other {channels}} on this team.** If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
|
||||
<FormattedMessage
|
||||
id='leave_team_modal.description'
|
||||
defaultMessage='<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?'
|
||||
values={{
|
||||
num_of_public_channels: numOfPublicChannels,
|
||||
num_of_private_channels: numOfPrivateChannels,
|
||||
strong: (chunks: React.ReactNode) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>);
|
||||
/>
|
||||
);
|
||||
} else if (numOfPublicChannels === 0) {
|
||||
modalMessage = (
|
||||
<FormattedMarkdownMessage
|
||||
id='leave_team_modal_private.desc'
|
||||
defaultMessage="**You will be removed from {num_of_private_channels} private {num_of_private_channels,one {channel} other {channels}} on this team.** If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?"
|
||||
<FormattedMessage
|
||||
id='leave_team_modal_private.description'
|
||||
defaultMessage='<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?'
|
||||
values={{
|
||||
num_of_public_channels: numOfPublicChannels,
|
||||
num_of_private_channels: numOfPrivateChannels,
|
||||
strong: (chunks: React.ReactNode) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>);
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
modalMessage = (
|
||||
<FormattedMarkdownMessage
|
||||
id='leave_team_modal_public.desc'
|
||||
defaultMessage='**You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels} } on this team.** Are you sure?'
|
||||
<FormattedMessage
|
||||
id='leave_team_modal_public.description'
|
||||
defaultMessage='<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} on this team.</strong> Are you sure?'
|
||||
values={{
|
||||
num_of_public_channels: numOfPublicChannels,
|
||||
num_of_private_channels: numOfPrivateChannels,
|
||||
strong: (chunks: React.ReactNode) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
@ -4135,12 +4135,12 @@
|
||||
"leave_private_channel_modal.title": "Leave Private Channel {channel}",
|
||||
"leave_public_channel_modal.message": "Are you sure you wish to leave the channel {channel}? You can re-join this channel in the future if you change your mind.",
|
||||
"leave_public_channel_modal.title": "Leave Channel {channel}",
|
||||
"leave_team_modal_guest_only_private.desc": "**You will be removed from {num_of_private_channels} private { num_of_private_channels,plural,one {channel} other {channels}} on this team.** You won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_guest_only_public.desc": "**You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels}} on this team.** You won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_guest.desc": "**You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private { num_of_private_channels,plural,one {channel} other {channels}} on this team.** You won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_private.desc": "**You will be removed from {num_of_private_channels} private { num_of_private_channels,plural,one {channel} other {channels} } on this team.** If the team is private you won't be able to rejoin it the team without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_public.desc": "**You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels} } on this team.** Are you sure?",
|
||||
"leave_team_modal.desc": "**You will be removed from {num_of_public_channels} public { num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private { num_of_private_channels,plural,one {channel} other {channels}} on this team.** If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_guest_only_private.description": "<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_guest_only_public.description": "<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_guest.description": "<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> You won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_private.description": "<strong>You will be removed from {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal_public.description": "<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} on this team.</strong> Are you sure?",
|
||||
"leave_team_modal.description": "<strong>You will be removed from {num_of_public_channels} public {num_of_public_channels,plural,one {channel} other {channels}} and {num_of_private_channels} private {num_of_private_channels,plural,one {channel} other {channels}} on this team.</strong> If the team is private you won't be able to rejoin it without an invitation from another team member. Are you sure?",
|
||||
"leave_team_modal.no": "No",
|
||||
"leave_team_modal.title": "Leave the team?",
|
||||
"leave_team_modal.yes": "Yes",
|
||||
|
Loading…
Reference in New Issue
Block a user