Skip to content

Commit

Permalink
Merge pull request #50384 from nkdengineer/fix/50381
Browse files Browse the repository at this point in the history
[Cp Stag] fix Spanish translation

(cherry picked from commit 342d5a1)

(CP triggered by thienlnam)
  • Loading branch information
thienlnam authored and OSBotify committed Oct 9, 2024
1 parent 8365475 commit fd9bbcb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -190,7 +190,7 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) {
<Text>{welcomeMessage.phrase1}</Text>
</Text>
)}
{isDefault && (
{isDefault && displayNamesWithTooltips.length > 0 && (
<Text>
<Text>{welcomeMessage.phrase1}</Text>
{displayNamesWithTooltips.map(({displayName, accountID}, index) => (
Expand Down
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 +.',
Expand Down
2 changes: 1 addition & 1 deletion src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ function getWelcomeMessage(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>)
})
.join(' ');

welcomeMessage.messageText = `${welcomeMessage.phrase1} ${displayNamesWithTooltipsText}`;
welcomeMessage.messageText = displayNamesWithTooltips.length ? `${welcomeMessage.phrase1} ${displayNamesWithTooltipsText}` : '';
return welcomeMessage;
}

Expand Down

0 comments on commit fd9bbcb

Please sign in to comment.