split end meeting message in two parts

This commit is contained in:
Ramon Souza 2021-03-08 16:14:09 -03:00
parent 78095f830d
commit 0a09112f80
2 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,10 @@ const intlMessages = defineMessages({
},
endMeetingDescription: {
id: 'app.endMeeting.description',
description: 'end meeting description with affected users information',
},
endMeetingNoUserDescription: {
id: 'app.endMeeting.noUserDescription',
description: 'end meeting description',
},
yesLabel: {
@ -40,8 +44,6 @@ class EndMeetingComponent extends React.PureComponent {
users, intl, closeModal, endMeeting, meetingTitle,
} = this.props;
const message = intl.formatMessage(intlMessages.endMeetingDescription, { 0: users }).split('.');
return (
<Modal
overlayClassName={styles.overlay}
@ -52,7 +54,10 @@ class EndMeetingComponent extends React.PureComponent {
>
<div className={styles.container}>
<div className={styles.description}>
{users > 0 ? message.join('.') : message[1]}
{users > 0
? intl.formatMessage(intlMessages.endMeetingDescription, { 0: users })
: intl.formatMessage(intlMessages.endMeetingNoUserDescription)
}
</div>
<div className={styles.footer}>
<Button

View File

@ -303,6 +303,7 @@
"app.leaveConfirmation.confirmDesc": "Logs you out of the meeting",
"app.endMeeting.title": "End {0}",
"app.endMeeting.description": "This action will end the session for {0} active user(s). Are you sure you want to end this session?",
"app.endMeeting.noUserDescription": "Are you sure you want to end this session?",
"app.endMeeting.yesLabel": "Yes",
"app.endMeeting.noLabel": "No",
"app.about.title": "About",