diff --git a/src/components/ReportWelcomeText.tsx b/src/components/ReportWelcomeText.tsx index 12708a7acbfa..0b314ac8b2a3 100644 --- a/src/components/ReportWelcomeText.tsx +++ b/src/components/ReportWelcomeText.tsx @@ -50,7 +50,7 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) { item !== CONST.IOU.TYPE.INVOICE, ); const additionalText = filteredOptions - .map((item, index) => `${index === filteredOptions.length - 1 ? `${translate('common.or')} ` : ''}${translate(`reportActionsView.iouTypes.${item}`)}`) + .map((item, index) => `${index === filteredOptions.length - 1 && index > 0 ? `${translate('common.or')} ` : ''}${translate(`reportActionsView.iouTypes.${item}`)}`) .join(', '); const canEditPolicyDescription = ReportUtils.canEditPolicyDescription(policy); const reportName = ReportUtils.getReportName(report); @@ -190,7 +190,7 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) { {welcomeMessage.phrase1} )} - {isDefault && ( + {isDefault && displayNamesWithTooltips.length > 0 && ( {welcomeMessage.phrase1} {displayNamesWithTooltips.map(({displayName, accountID}, index) => ( diff --git a/src/languages/es.ts b/src/languages/es.ts index 771285c97c2e..51460e381072 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -662,7 +662,7 @@ const translations = { beginningOfChatHistoryUserRoomPartTwo: ' Fue creado por.', beginningOfChatHistoryInvoiceRoomPartOne: `Este chat es para facturas entre `, beginningOfChatHistoryInvoiceRoomPartTwo: `. Usa el botón + para enviar una factura.`, - beginningOfChatHistory: 'Este chat es con', + beginningOfChatHistory: 'Este chat es con ', beginningOfChatHistoryPolicyExpenseChatPartOne: 'Aquí es donde ', beginningOfChatHistoryPolicyExpenseChatPartTwo: ' enviará los gastos al espacio de trabajo ', beginningOfChatHistoryPolicyExpenseChatPartThree: '. Solo usa el botón +.', diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 99811645a6ea..eb5b3c58cdef 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -573,7 +573,7 @@ function getWelcomeMessage(report: OnyxEntry, policy: OnyxEntry) }) .join(' '); - welcomeMessage.messageText = `${welcomeMessage.phrase1} ${displayNamesWithTooltipsText}`; + welcomeMessage.messageText = displayNamesWithTooltips.length ? `${welcomeMessage.phrase1} ${displayNamesWithTooltipsText}` : ''; return welcomeMessage; }