From 7895000ab755e7b728b38d6d37fd84489e58e60a Mon Sep 17 00:00:00 2001 From: TheInvincible <139259364+TheInvincibleRalph@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:56:12 +0100 Subject: [PATCH] [MM-60824] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/leave_team_modal/leave_team_modal.tsx' with FormattedMessage (#28547) --- .../leave_team_modal.test.tsx.snap | 8 +-- .../leave_team_modal/leave_team_modal.tsx | 58 ++++++++++--------- webapp/channels/src/i18n/en.json | 12 ++-- 3 files changed, 40 insertions(+), 38 deletions(-) diff --git a/webapp/channels/src/components/leave_team_modal/__snapshots__/leave_team_modal.test.tsx.snap b/webapp/channels/src/components/leave_team_modal/__snapshots__/leave_team_modal.test.tsx.snap index 0f2f1e4d40..2c9e43c1ed 100644 --- a/webapp/channels/src/components/leave_team_modal/__snapshots__/leave_team_modal.test.tsx.snap +++ b/webapp/channels/src/components/leave_team_modal/__snapshots__/leave_team_modal.test.tsx.snap @@ -52,13 +52,13 @@ exports[`components/LeaveTeamModal should render the leave team model 1`] = ` bsClass="modal-body" componentClass="div" > - diff --git a/webapp/channels/src/components/leave_team_modal/leave_team_modal.tsx b/webapp/channels/src/components/leave_team_modal/leave_team_modal.tsx index 1d22dda50f..a66ccd38eb 100644 --- a/webapp/channels/src/components/leave_team_modal/leave_team_modal.tsx +++ b/webapp/channels/src/components/leave_team_modal/leave_team_modal.tsx @@ -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 { if (isGuest) { if (numOfPublicChannels !== 0 && numOfPrivateChannels !== 0) { modalMessage = ( - {chunks}, }} /> ); } else if (numOfPublicChannels === 0) { modalMessage = ( - {chunks}, }} /> ); } else { modalMessage = ( - {chunks}, }} - />); + /> + ); } } else if (numOfPublicChannels !== 0 && numOfPrivateChannels !== 0) { modalMessage = ( - {chunks}, }} - />); + /> + ); } else if (numOfPublicChannels === 0) { modalMessage = ( - {chunks}, }} - />); + /> + ); } else { modalMessage = ( - {chunks}, }} /> ); diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 28a00d5273..a5819a9749 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -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": "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.description": "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.description": "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.description": "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 without an invitation from another team member. Are you sure?", + "leave_team_modal_public.description": "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.description": "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.no": "No", "leave_team_modal.title": "Leave the team?", "leave_team_modal.yes": "Yes",