From aa450f2432ebd10b57d4d83c09f4e15e684167d7 Mon Sep 17 00:00:00 2001 From: Rita Anene <92169163+Camillarhi@users.noreply.github.com> Date: Mon, 21 Oct 2024 05:56:03 +0100 Subject: [PATCH] [MM-60861] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/notify_confirm_modal.tsx' with FormattedMessage (#28772) --- .../src/components/notify_confirm_modal.tsx | 49 ++++++++++--------- webapp/channels/src/i18n/en.json | 16 +++--- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/webapp/channels/src/components/notify_confirm_modal.tsx b/webapp/channels/src/components/notify_confirm_modal.tsx index 8e18a2719ee..d1520d56510 100644 --- a/webapp/channels/src/components/notify_confirm_modal.tsx +++ b/webapp/channels/src/components/notify_confirm_modal.tsx @@ -5,7 +5,6 @@ import React from 'react'; import {FormattedMessage, defineMessages} from 'react-intl'; import ConfirmModalRedux from 'components/confirm_modal_redux'; -import FormattedMarkdownMessage from 'components/formatted_markdown_message'; type Props = { mentions: string[]; @@ -31,21 +30,23 @@ export default class NotifyConfirmModal extends React.PureComponent { if (channelTimezoneCount > 0) { const message = mentions.length === 1 && mentions[0] === '@here' ? messages.atHereTimezones : messages.atAllTimezones; notifyAllMessage = ( - {chunks}, }} /> ); } else { const message = mentions.length === 1 && mentions[0] === '@here' ? messages.atHere : messages.atAll; notifyAllMessage = ( - {chunks}, }} /> ); @@ -61,50 +62,54 @@ export default class NotifyConfirmModal extends React.PureComponent { if (mentions.length === 1) { if (channelTimezoneCount > 0) { notifyAllMessage = ( - {chunks}, }} /> ); } else { notifyAllMessage = ( - {chunks}, }} /> ); } } else if (channelTimezoneCount > 0) { notifyAllMessage = ( - {chunks}, }} /> ); } else { notifyAllMessage = ( - {chunks}, }} /> ); @@ -132,19 +137,19 @@ export default class NotifyConfirmModal extends React.PureComponent { const messages = defineMessages({ atAll: { - id: 'notify_all.question', - defaultMessage: 'By using **@all** or **@channel** you are about to send notifications to **{totalMembers} people**. Are you sure you want to do this?', + id: 'notifyAll.question', + defaultMessage: 'By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?', }, atAllTimezones: { - id: 'notify_all.question_timezone', - defaultMessage: 'By using **@all** or **@channel** you are about to send notifications to **{totalMembers} people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?', + id: 'notifyAll.questionTimezone', + defaultMessage: 'By using @all or @channel you are about to send notifications to {totalMembers} people in {timezones, number} {timezones, plural, one {timezone} other {timezones}}. Are you sure you want to do this?', }, atHere: { id: 'notify_here.question', - defaultMessage: 'By using **@here** you are about to send notifications to up to **{totalMembers} other people**. Are you sure you want to do this?', + defaultMessage: 'By using @here you are about to send notifications to at least {totalMembers} other people. Are you sure you want to do this?', }, atHereTimezones: { - id: 'notify_here.question_timezone', - defaultMessage: 'By using **@here** you are about to send notifications to up to **{totalMembers} other people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?', + id: 'notifyHere.question_timezone', + defaultMessage: 'By using @here you are about to send notifications to at least {totalMembers} other people in {timezones, number} {timezones, plural, one {timezone} other {timezones}}. Are you sure you want to do this?', }, }); diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 8f7910e0909..dcf298ce074 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -4443,16 +4443,16 @@ "notification.crt": "Reply in {title}", "notification.dm": "Direct Message", "notify_all.confirm": "Confirm", - "notify_all.question": "By using **@all** or **@channel** you are about to send notifications to **{totalMembers} people**. Are you sure you want to do this?", - "notify_all.question_groups": "By using **{mentions}** and **{finalMention}** you are about to send notifications to at least **{totalMembers} people**. Are you sure you want to do this?", - "notify_all.question_one_group": "By using **{mention}** you are about to send notifications to **{totalMembers} people**. Are you sure you want to do this?", - "notify_all.question_timezone": "By using **@all** or **@channel** you are about to send notifications to **{totalMembers} people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?", - "notify_all.question_timezone_groups": "By using **{mentions}** and **{finalMention}** you are about to send notifications to at least **{totalMembers} people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?", - "notify_all.question_timezone_one_group": "By using **{mention}** you are about to send notifications to **{totalMembers} people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?", "notify_all.title.confirm": "Confirm Sending Notifications to Entire Channel", "notify_all.title.confirm_groups": "Confirm sending notifications to groups", - "notify_here.question": "By using **@here** you are about to send notifications to up to **{totalMembers} other people**. Are you sure you want to do this?", - "notify_here.question_timezone": "By using **@here** you are about to send notifications to up to **{totalMembers} other people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?", + "notify_here.question": "By using @here you are about to send notifications to at least {totalMembers} other people. Are you sure you want to do this?", + "notifyAll.question": "By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?", + "notifyAll.question_groups": "By using {mentions} and {finalMention} you are about to send notifications to at least {totalMembers} people. Are you sure you want to do this?", + "notifyAll.question_oneGroup": "By using {mention} you are about to send notifications to at least {totalMembers} people. Are you sure you want to do this?", + "notifyAll.question_timezone_oneGroup": "By using {mention} you are about to send notifications to at least {totalMembers} people in {timezones, number} {timezones, plural, one {timezone} other {timezones}}. Are you sure you want to do this?", + "notifyAll.question_timezoneGroups": "By using {mentions} and {finalMention} you are about to send notifications to at least {totalMembers} people in {timezones, number} {timezones, plural, one {timezone} other {timezones}}. Are you sure you want to do this?", + "notifyAll.questionTimezone": "By using @all or @channel you are about to send notifications to {totalMembers} people in {timezones, number} {timezones, plural, one {timezone} other {timezones}}. Are you sure you want to do this?", + "notifyHere.question_timezone": "By using @here you are about to send notifications to at least {totalMembers} other people in {timezones, number} {timezones, plural, one {timezone} other {timezones}}. Are you sure you want to do this?", "numMembers": "{num, number} {num, plural, one {member} other {members}}", "onboarding_wizard.invite_members_cloud.title": "Invite your team members", "onboarding_wizard.invite_members.copied_link": "Link Copied",