diff --git a/src/components/ReportWelcomeText.js b/src/components/ReportWelcomeText.js index 480b65336e06..9a73acdfce26 100644 --- a/src/components/ReportWelcomeText.js +++ b/src/components/ReportWelcomeText.js @@ -67,32 +67,45 @@ const ReportWelcomeText = (props) => { }, ); const chatUsers = props.shouldIncludeParticipants ? displayNamesWithTooltips : [{displayName: props.report.reportName}]; + const isResctrictedRoom = lodashGet(props, 'report.visibility', '') === CONST.REPORT.VISIBILITY.RESTRICTED; return ( - - {!props.shouldIncludeParticipants - ? `${props.translate('reportActionsView.beginningOfChatHistoryPrivatePartOne')}` - : `${props.translate('reportActionsView.beginningOfChatHistory')} `} - - {!props.shouldIncludeParticipants && {` ${lodashGet(chatUsers, '[0].displayName', '')}`}} - {!props.shouldIncludeParticipants && {props.translate('reportActionsView.beginningOfChatHistoryPrivatePartTwo')}} - {props.shouldIncludeParticipants - && ( - <> - {_.map(chatUsers, ({displayName, pronouns}, index) => ( - - - {displayName} - - {!_.isEmpty(pronouns) && {` (${pronouns})`}} - {(index === chatUsers.length - 1) && .} - {(index === chatUsers.length - 2) && {` ${props.translate('common.and')} `}} - {(index < chatUsers.length - 2) && , } + {!props.shouldIncludeParticipants + ? ( + <> + + {isResctrictedRoom + ? `${props.translate('reportActionsView.beginningOfChatHistoryRestrictedPartOne')}` + : `${props.translate('reportActionsView.beginningOfChatHistoryPrivatePartOne')}`} + + + {lodashGet(chatUsers, '[0].displayName', '')} + + + {isResctrictedRoom + ? `${props.translate('reportActionsView.beginningOfChatHistoryRestrictedPartTwo')}` + : `${props.translate('reportActionsView.beginningOfChatHistoryPrivatePartTwo')}`} - ))} - - )} + + ) : ( + <> + + {props.translate('reportActionsView.beginningOfChatHistory')} + + {_.map(chatUsers, ({displayName, pronouns}, index) => ( + + + {displayName} + + {!_.isEmpty(pronouns) && {` (${pronouns})`}} + {(index === chatUsers.length - 1) && .} + {(index === chatUsers.length - 2) && {` ${props.translate('common.and')} `}} + {(index < chatUsers.length - 2) && , } + + ))} + + )} ); }; diff --git a/src/languages/en.js b/src/languages/en.js index 35f839f73b8e..d7ce5d3259f0 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -168,9 +168,11 @@ export default { deleteConfirmation: 'Are you sure you want to delete this comment?', }, reportActionsView: { - beginningOfChatHistory: 'This is the beginning of your chat history with', - beginningOfChatHistoryPrivatePartOne: 'This is the beginning of the private', + beginningOfChatHistory: 'This is the beginning of your chat history with ', + beginningOfChatHistoryPrivatePartOne: 'This is the beginning of the private ', + beginningOfChatHistoryRestrictedPartOne: 'This is the beginning of ', beginningOfChatHistoryPrivatePartTwo: ' room, invite others by @mentioning them.', + beginningOfChatHistoryRestrictedPartTwo: ', invite others by @mentioning them.', }, reportActionsViewMarkerBadge: { newMsg: ({count}) => `${count} new message${count > 1 ? 's' : ''}`, diff --git a/src/languages/es.js b/src/languages/es.js index 0130a025737c..2495396a063d 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -168,9 +168,11 @@ export default { deleteConfirmation: '¿Estás seguro de que quieres eliminar este comentario?', }, reportActionsView: { - beginningOfChatHistory: 'Aquí comienza tu historial de conversaciones con', - beginningOfChatHistoryPrivatePartOne: 'Este es el principio de la sala privada', + beginningOfChatHistory: 'Aquí comienza tu historial de conversaciones con ', + beginningOfChatHistoryPrivatePartOne: 'Este es el principio de la sala privada ', + beginningOfChatHistoryRestrictedPartOne: 'Este es el principio de ', beginningOfChatHistoryPrivatePartTwo: ', invita a otros @mencionándolos.', + beginningOfChatHistoryRestrictedPartTwo: ', invita a otros @mencionándolos.', }, reportActionsViewMarkerBadge: { newMsg: ({count}) => `${count} mensaje${count > 1 ? 's' : ''} nuevo${count > 1 ? 's' : ''}`,