Skip to content

Commit

Permalink
Merge pull request Expensify#48843 from rayane-djouah/Update-member-n…
Browse files Browse the repository at this point in the history
…ot-found-message-in-announce-room-members-page

Update member not found message copy in announce room members page
  • Loading branch information
yuwenmemon authored Sep 10, 2024
2 parents a9ecd8a + e83f874 commit 3a2aec2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3853,7 +3853,8 @@ export default {
renamedWorkspaceNameAction: ({oldName, newName}) => `updated the name of this workspace from ${oldName} to ${newName}`,
},
roomMembersPage: {
memberNotFound: 'Member not found. To invite a new member to the room, please use the invite button above.',
memberNotFound: 'Member not found.',
useInviteButton: 'To invite a new member to the chat, please use the invite button above.',
notAuthorized: `You don't have access to this page. If you're trying to join this room, just ask a room member to add you. Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`,
removeMembersPrompt: 'Are you sure you want to remove the selected members from the room?',
error: {
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3904,7 +3904,8 @@ export default {
renamedWorkspaceNameAction: ({oldName, newName}) => `actualizó el nombre de este espacio de trabajo de ${oldName} a ${newName}`,
},
roomMembersPage: {
memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro a la sala de chat, por favor, utiliza el botón invitar que está más arriba.',
memberNotFound: 'Miembro no encontrado.',
useInviteButton: 'Para invitar a un nuevo miembro al chat, por favor, utiliza el botón invitar que está más arriba.',
notAuthorized: `No tienes acceso a esta página. Si estás intentando unirte a esta sala, pide a un miembro de la sala que te añada. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`,
removeMembersPrompt: '¿Estás seguro de que quieres eliminar a los miembros seleccionados de la sala de chat?',
error: {
Expand Down
10 changes: 7 additions & 3 deletions src/pages/ReportParticipantsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ function ReportParticipantsPage({report}: WithReportOrNotFoundProps) {
return header;
}

return <View style={[styles.peopleRow, styles.userSelectNone, styles.ph9, styles.pb5, isGroupChat ? styles.mt3 : styles.mt0]}>{header}</View>;
}, [styles, translate, isGroupChat, StyleUtils, canSelectMultiple]);
return <View style={[styles.peopleRow, styles.userSelectNone, styles.ph9, styles.pb5, shouldShowTextInput ? styles.mt3 : styles.mt0]}>{header}</View>;
}, [styles, translate, isGroupChat, shouldShowTextInput, StyleUtils, canSelectMultiple]);

const bulkActionsButtonOptions = useMemo(() => {
const options: Array<DropdownOption<WorkspaceMemberBulkActionType>> = [
Expand Down Expand Up @@ -349,7 +349,11 @@ function ReportParticipantsPage({report}: WithReportOrNotFoundProps) {

const selectionModeHeader = selectionMode?.isEnabled && isSmallScreenWidth;

const headerMessage = searchValue.trim() && !participants.length ? translate('roomMembersPage.memberNotFound') : '';
// eslint-disable-next-line rulesdir/no-negated-variables
const memberNotFoundMessage = isGroupChat
? `${translate('roomMembersPage.memberNotFound')} ${translate('roomMembersPage.useInviteButton')}`
: translate('roomMembersPage.memberNotFound');
const headerMessage = searchValue.trim() && !participants.length ? memberNotFoundMessage : '';

return (
<ScreenWrapper
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RoomMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function RoomMembersPage({report, session, policies}: RoomMembersPageProps) {
return PolicyUtils.isPolicyEmployee(report.policyID, policies);
}, [report?.policyID, policies]);

const headerMessage = searchValue.trim() && !data.length ? translate('roomMembersPage.memberNotFound') : '';
const headerMessage = searchValue.trim() && !data.length ? `${translate('roomMembersPage.memberNotFound')} ${translate('roomMembersPage.useInviteButton')}` : '';

const bulkActionsButtonOptions = useMemo(() => {
const options: Array<DropdownOption<RoomMemberBulkActionType>> = [
Expand Down

0 comments on commit 3a2aec2

Please sign in to comment.