[MM-60861] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/notify_confirm_modal.tsx' with FormattedMessage (#28772)
Этот коммит содержится в:
@@ -5,7 +5,6 @@ import React from 'react';
|
|||||||
import {FormattedMessage, defineMessages} from 'react-intl';
|
import {FormattedMessage, defineMessages} from 'react-intl';
|
||||||
|
|
||||||
import ConfirmModalRedux from 'components/confirm_modal_redux';
|
import ConfirmModalRedux from 'components/confirm_modal_redux';
|
||||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
mentions: string[];
|
mentions: string[];
|
||||||
@@ -31,21 +30,23 @@ export default class NotifyConfirmModal extends React.PureComponent<Props> {
|
|||||||
if (channelTimezoneCount > 0) {
|
if (channelTimezoneCount > 0) {
|
||||||
const message = mentions.length === 1 && mentions[0] === '@here' ? messages.atHereTimezones : messages.atAllTimezones;
|
const message = mentions.length === 1 && mentions[0] === '@here' ? messages.atHereTimezones : messages.atAllTimezones;
|
||||||
notifyAllMessage = (
|
notifyAllMessage = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
{...message}
|
{...message}
|
||||||
values={{
|
values={{
|
||||||
totalMembers: memberNotifyCount,
|
totalMembers: memberNotifyCount,
|
||||||
timezones: channelTimezoneCount,
|
timezones: channelTimezoneCount,
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const message = mentions.length === 1 && mentions[0] === '@here' ? messages.atHere : messages.atAll;
|
const message = mentions.length === 1 && mentions[0] === '@here' ? messages.atHere : messages.atAll;
|
||||||
notifyAllMessage = (
|
notifyAllMessage = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
{...message}
|
{...message}
|
||||||
values={{
|
values={{
|
||||||
totalMembers: memberNotifyCount,
|
totalMembers: memberNotifyCount,
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@@ -61,50 +62,54 @@ export default class NotifyConfirmModal extends React.PureComponent<Props> {
|
|||||||
if (mentions.length === 1) {
|
if (mentions.length === 1) {
|
||||||
if (channelTimezoneCount > 0) {
|
if (channelTimezoneCount > 0) {
|
||||||
notifyAllMessage = (
|
notifyAllMessage = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='notify_all.question_timezone_one_group'
|
id='notifyAll.question_timezone_oneGroup'
|
||||||
defaultMessage='By using **{mention}** you are about to send notifications of up to **{totalMembers} people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?'
|
defaultMessage='By using <b>{mention}</b> you are about to send notifications to at least <b>{totalMembers} people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?'
|
||||||
values={{
|
values={{
|
||||||
mention: mentions[0],
|
mention: mentions[0],
|
||||||
totalMembers: memberNotifyCount,
|
totalMembers: memberNotifyCount,
|
||||||
timezones: channelTimezoneCount,
|
timezones: channelTimezoneCount,
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
notifyAllMessage = (
|
notifyAllMessage = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='notify_all.question_one_group'
|
id='notifyAll.question_oneGroup'
|
||||||
defaultMessage='By using **{mention}** you are about to send notifications of up to **{totalMembers} people**. Are you sure you want to do this?'
|
defaultMessage='By using <b>{mention}</b> you are about to send notifications to at least <b>{totalMembers} people</b>. Are you sure you want to do this?'
|
||||||
values={{
|
values={{
|
||||||
mention: mentions[0],
|
mention: mentions[0],
|
||||||
totalMembers: memberNotifyCount,
|
totalMembers: memberNotifyCount,
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (channelTimezoneCount > 0) {
|
} else if (channelTimezoneCount > 0) {
|
||||||
notifyAllMessage = (
|
notifyAllMessage = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='notify_all.question_timezone_groups'
|
id='notifyAll.question_timezoneGroups'
|
||||||
defaultMessage='By using **{mentions}** and **{finalMention}** you are about to send notifications of up to **{totalMembers} people** in **{timezones, number} {timezones, plural, one {timezone} other {timezones}}**. Are you sure you want to do this?'
|
defaultMessage='By using <b>{mentions}</b> and <b>{finalMention}</b> you are about to send notifications to at least <b>{totalMembers} people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?'
|
||||||
values={{
|
values={{
|
||||||
mentions: mentions.slice(0, -1).join(', '),
|
mentions: mentions.slice(0, -1).join(', '),
|
||||||
finalMention: mentions[mentions.length - 1],
|
finalMention: mentions[mentions.length - 1],
|
||||||
totalMembers: memberNotifyCount,
|
totalMembers: memberNotifyCount,
|
||||||
timezones: channelTimezoneCount,
|
timezones: channelTimezoneCount,
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
notifyAllMessage = (
|
notifyAllMessage = (
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='notify_all.question_groups'
|
id='notifyAll.question_groups'
|
||||||
defaultMessage='By using **{mentions}** and **{finalMention}** you are about to send notifications of up to **{totalMembers} people**. Are you sure you want to do this?'
|
defaultMessage='By using <b>{mentions}</b> and <b>{finalMention}</b> you are about to send notifications to at least <b>{totalMembers} people</b>. Are you sure you want to do this?'
|
||||||
values={{
|
values={{
|
||||||
mentions: mentions.slice(0, -1).join(', '),
|
mentions: mentions.slice(0, -1).join(', '),
|
||||||
finalMention: mentions[mentions.length - 1],
|
finalMention: mentions[mentions.length - 1],
|
||||||
totalMembers: memberNotifyCount,
|
totalMembers: memberNotifyCount,
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@@ -132,19 +137,19 @@ export default class NotifyConfirmModal extends React.PureComponent<Props> {
|
|||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
atAll: {
|
atAll: {
|
||||||
id: 'notify_all.question',
|
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?',
|
defaultMessage: 'By using <b>@all</b> or <b>@channel</b> you are about to send notifications to <b>{totalMembers} people</b>. Are you sure you want to do this?',
|
||||||
},
|
},
|
||||||
atAllTimezones: {
|
atAllTimezones: {
|
||||||
id: 'notify_all.question_timezone',
|
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?',
|
defaultMessage: 'By using <b>@all</b> or <b>@channel</b> you are about to send notifications to <b>{totalMembers} people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?',
|
||||||
},
|
},
|
||||||
atHere: {
|
atHere: {
|
||||||
id: 'notify_here.question',
|
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 <b>@here</b> you are about to send notifications to at least <b>{totalMembers} other people</b>. Are you sure you want to do this?',
|
||||||
},
|
},
|
||||||
atHereTimezones: {
|
atHereTimezones: {
|
||||||
id: 'notify_here.question_timezone',
|
id: 'notifyHere.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?',
|
defaultMessage: 'By using <b>@here</b> you are about to send notifications to at least <b>{totalMembers} other people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4443,16 +4443,16 @@
|
|||||||
"notification.crt": "Reply in {title}",
|
"notification.crt": "Reply in {title}",
|
||||||
"notification.dm": "Direct Message",
|
"notification.dm": "Direct Message",
|
||||||
"notify_all.confirm": "Confirm",
|
"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": "Confirm Sending Notifications to Entire Channel",
|
||||||
"notify_all.title.confirm_groups": "Confirm sending notifications to groups",
|
"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": "By using <b>@here</b> you are about to send notifications to at least <b>{totalMembers} other people</b>. 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?",
|
"notifyAll.question": "By using <b>@all</b> or <b>@channel</b> you are about to send notifications to <b>{totalMembers} people</b>. Are you sure you want to do this?",
|
||||||
|
"notifyAll.question_groups": "By using <b>{mentions}</b> and <b>{finalMention}</b> you are about to send notifications to at least <b>{totalMembers} people</b>. Are you sure you want to do this?",
|
||||||
|
"notifyAll.question_oneGroup": "By using <b>{mention}</b> you are about to send notifications to at least <b>{totalMembers} people</b>. Are you sure you want to do this?",
|
||||||
|
"notifyAll.question_timezone_oneGroup": "By using <b>{mention}</b> you are about to send notifications to at least <b>{totalMembers} people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?",
|
||||||
|
"notifyAll.question_timezoneGroups": "By using <b>{mentions}</b> and <b>{finalMention}</b> you are about to send notifications to at least <b>{totalMembers} people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?",
|
||||||
|
"notifyAll.questionTimezone": "By using <b>@all</b> or <b>@channel</b> you are about to send notifications to <b>{totalMembers} people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?",
|
||||||
|
"notifyHere.question_timezone": "By using <b>@here</b> you are about to send notifications to at least <b>{totalMembers} other people</b> in <b>{timezones, number} {timezones, plural, one {timezone} other {timezones}}</b>. Are you sure you want to do this?",
|
||||||
"numMembers": "{num, number} {num, plural, one {member} other {members}}",
|
"numMembers": "{num, number} {num, plural, one {member} other {members}}",
|
||||||
"onboarding_wizard.invite_members_cloud.title": "Invite your team members",
|
"onboarding_wizard.invite_members_cloud.title": "Invite your team members",
|
||||||
"onboarding_wizard.invite_members.copied_link": "Link Copied",
|
"onboarding_wizard.invite_members.copied_link": "Link Copied",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user