diff --git a/src/CONST.ts b/src/CONST.ts index 07a65a6b5bd9..95ea956bdbd6 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1103,8 +1103,9 @@ const CONST = { COMPANY_CARDS_CONNECT_CREDIT_CARDS_HELP_URL: 'https://help.expensify.com/new-expensify/hubs/connect-credit-cards/', CUSTOM_REPORT_NAME_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/spending-insights/Export-Expenses-And-Reports#formulas', CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings', + CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL: 'https://help.expensify.com/articles/new-expensify/workspaces/Set-up-rules#configure-expense-report-rules', + SELECT_WORKFLOWS_HELP_URL: 'https://help.expensify.com/articles/new-expensify/workspaces/Set-up-workflows#select-workflows', COPILOT_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Add-or-Act-As-a-Copilot', - DELAYED_SUBMISSION_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports', ENCRYPTION_AND_SECURITY_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Encryption-and-Data-Security', PLAN_TYPES_AND_PRICING_HELP_URL: 'https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Plan-types-and-pricing', MERGE_ACCOUNT_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Merge-Accounts', diff --git a/src/languages/en.ts b/src/languages/en.ts index a54e7f9c91b6..3e69adf73a73 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -123,8 +123,8 @@ import type { OptionalParam, OurEmailProviderParams, OwnerOwesAmountParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, + PaidElsewhereParams, + PaidWithExpensifyParams, ParentNavigationSummaryParams, PayerOwesAmountParams, PayerOwesParams, @@ -185,7 +185,6 @@ import type { ToValidateLoginParams, TransferParams, TrialStartedTitleParams, - UnapprovedParams, UnapproveWithIntegrationWarningParams, UnreportedTransactionParams, UnshareParams, @@ -1032,8 +1031,8 @@ const translations = { sendInvoice: ({amount}: RequestAmountParams) => `Send ${amount} invoice`, submitAmount: ({amount}: RequestAmountParams) => `Submit ${amount}`, submittedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `submitted ${formattedAmount}${comment ? ` for ${comment}` : ''}`, - automaticallySubmittedAmount: ({formattedAmount}: RequestedAmountMessageParams) => - `automatically submitted ${formattedAmount} via delayed submission`, + submitted: `submitted`, + automaticallySubmitted: `submitted via delay submissions`, trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `tracking ${formattedAmount}${comment ? ` for ${comment}` : ''}`, splitAmount: ({amount}: SplitAmountParams) => `split ${amount}`, didSplitAmount: ({formattedAmount, comment}: DidSplitAmountMessageParams) => `split ${formattedAmount}${comment ? ` for ${comment}` : ''}`, @@ -1048,24 +1047,23 @@ const translations = { managerApprovedAmount: ({manager, amount}: ManagerApprovedAmountParams) => `${manager} approved ${amount}`, payerSettled: ({amount}: PayerSettledParams) => `paid ${amount}`, payerSettledWithMissingBankAccount: ({amount}: PayerSettledParams) => `paid ${amount}. Add a bank account to receive your payment.`, - automaticallyApprovedAmount: ({amount}: ApprovedAmountParams) => - `automatically approved ${amount} via workspace rules`, + automaticallyApproved: `approved via workspace rules`, approvedAmount: ({amount}: ApprovedAmountParams) => `approved ${amount}`, - unapprovedAmount: ({amount}: UnapprovedParams) => `unapproved ${amount}`, - automaticallyForwardedAmount: ({amount}: ForwardedAmountParams) => - `automatically approved ${amount} via workspace rules`, + approvedMessage: `approved`, + unapproved: `unapproved`, + automaticallyForwardedAmount: ({amount}: ForwardedAmountParams) => `approved ${amount} via workspace rules`, forwardedAmount: ({amount}: ForwardedAmountParams) => `approved ${amount}`, rejectedThisReport: 'rejected this report', waitingOnBankAccount: ({submitterDisplayName}: WaitingOnBankAccountParams) => `started settling up. Payment is on hold until ${submitterDisplayName} adds a bank account.`, - adminCanceledRequest: ({manager, amount}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceled the ${amount} payment`, + adminCanceledRequest: ({manager}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceled the payment`, canceledRequest: ({amount, submitterDisplayName}: CanceledRequestParams) => `canceled the ${amount} payment, because ${submitterDisplayName} did not enable their Expensify Wallet within 30 days`, settledAfterAddedBankAccount: ({submitterDisplayName, amount}: SettledAfterAddedBankAccountParams) => `${submitterDisplayName} added a bank account. The ${amount} payment has been made.`, - paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} elsewhere`, - paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} with Expensify`, - automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) => - `${payer ? `${payer} ` : ''}automatically paid ${amount} with Expensify via workspace rules`, + paidElsewhere: ({payer}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}paid elsewhere`, + paidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) => `${payer ? `${payer} ` : ''}paid with Expensify`, + automaticallyPaidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) => + `${payer ? `${payer} ` : ''}paid with Expensify via workspace rules`, noReimbursableExpenses: 'This report has an invalid amount', pendingConversionMessage: "Total will update when you're back online", changedTheExpense: 'changed the expense', @@ -5437,14 +5435,15 @@ const translations = { `changed the workspace to ${toPolicyName}${fromPolicyName ? ` (previously ${fromPolicyName})` : ''}`, changeType: ({oldType, newType}: ChangeTypeParams) => `changed type from ${oldType} to ${newType}`, delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`, - exportedToCSV: `exported this report to CSV`, + exportedToCSV: `exported to CSV`, exportedToIntegration: { - automatic: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}.`, - automaticActionOne: ({label}: ExportedToIntegrationParams) => `automatically exported this report to ${label} via`, - automaticActionTwo: 'accounting settings.', + automatic: ({label}: ExportedToIntegrationParams) => `exported to ${label}`, + automaticActionOne: ({label}: ExportedToIntegrationParams) => `exported to ${label} via`, + automaticActionTwo: 'accounting settings', manual: ({label}: ExportedToIntegrationParams) => `marked this report as manually exported to ${label}.`, - reimburseableLink: 'View out-of-pocket expenses.', - nonReimbursableLink: 'View company card expenses.', + automaticActionThree: 'and successfully created a record for', + reimburseableLink: 'out-of-pocket expenses', + nonReimbursableLink: 'company card expenses.', pending: ({label}: ExportedToIntegrationParams) => `started exporting this report to ${label}...`, }, integrationsMessage: ({errorMessage, label, linkText, linkURL}: IntegrationSyncFailedParams) => diff --git a/src/languages/es.ts b/src/languages/es.ts index 963e70933558..d2dfb7a35ebd 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -122,8 +122,8 @@ import type { OptionalParam, OurEmailProviderParams, OwnerOwesAmountParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, + PaidElsewhereParams, + PaidWithExpensifyParams, ParentNavigationSummaryParams, PayerOwesAmountParams, PayerOwesParams, @@ -184,7 +184,6 @@ import type { ToValidateLoginParams, TransferParams, TrialStartedTitleParams, - UnapprovedParams, UnapproveWithIntegrationWarningParams, UnreportedTransactionParams, UnshareParams, @@ -1027,8 +1026,8 @@ const translations = { sendInvoice: ({amount}: RequestAmountParams) => `Enviar factura de ${amount}`, submitAmount: ({amount}: RequestAmountParams) => `Solicitar ${amount}`, submittedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `solicitó ${formattedAmount}${comment ? ` para ${comment}` : ''}`, - automaticallySubmittedAmount: ({formattedAmount}: RequestedAmountMessageParams) => - `se enviaron automáticamente ${formattedAmount} mediante envío diferido`, + submitted: `enviado`, + automaticallySubmitted: `envió mediante retrasar envíos`, trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `realizó un seguimiento de ${formattedAmount}${comment ? ` para ${comment}` : ''}`, splitAmount: ({amount}: SplitAmountParams) => `dividir ${amount}`, didSplitAmount: ({formattedAmount, comment}: DidSplitAmountMessageParams) => `dividió ${formattedAmount}${comment ? ` para ${comment}` : ''}`, @@ -1043,24 +1042,24 @@ const translations = { managerApprovedAmount: ({manager, amount}: ManagerApprovedAmountParams) => `${manager} aprobó ${amount}`, payerSettled: ({amount}: PayerSettledParams) => `pagó ${amount}`, payerSettledWithMissingBankAccount: ({amount}: PayerSettledParams) => `pagó ${amount}. Agrega una cuenta bancaria para recibir tu pago.`, - automaticallyApprovedAmount: ({amount}: ApprovedAmountParams) => - `aprobado automáticamente ${amount} según las reglas del espacio de trabajo`, + automaticallyApproved: `aprobó mediante reglas del espacio de trabajo`, approvedAmount: ({amount}: ApprovedAmountParams) => `aprobó ${amount}`, - unapprovedAmount: ({amount}: UnapprovedParams) => `desaprobó ${amount}`, + approvedMessage: `aprobado`, + unapproved: `no aprobado`, automaticallyForwardedAmount: ({amount}: ForwardedAmountParams) => - `aprobado automáticamente ${amount} según las reglas del espacio de trabajo`, + `aprobó ${amount} mediante reglas del espacio de trabajo`, forwardedAmount: ({amount}: ForwardedAmountParams) => `aprobó ${amount}`, rejectedThisReport: 'rechazó este informe', waitingOnBankAccount: ({submitterDisplayName}: WaitingOnBankAccountParams) => `inició el pago, pero no se procesará hasta que ${submitterDisplayName} añada una cuenta bancaria`, - adminCanceledRequest: ({manager, amount}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceló el pago de ${amount}`, + adminCanceledRequest: ({manager}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceló el pago`, canceledRequest: ({amount, submitterDisplayName}: CanceledRequestParams) => `canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu Billetera Expensify en un plazo de 30 días.`, settledAfterAddedBankAccount: ({submitterDisplayName, amount}: SettledAfterAddedBankAccountParams) => `${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`, - paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} de otra forma`, - paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} con Expensify`, - automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) => - `${payer ? `${payer} ` : ''}auto-pagó ${amount} con Expensify via reglas del espacio de trabajo`, + paidElsewhere: ({payer}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}pagó de otra forma`, + paidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) => `${payer ? `${payer} ` : ''}pagó con Expensify`, + automaticallyPaidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) => + `${payer ? `${payer} ` : ''}pagó con Expensify via reglas del espacio de trabajo`, noReimbursableExpenses: 'El importe de este informe no es válido', pendingConversionMessage: 'El total se actualizará cuando estés online', changedTheExpense: 'cambió el gasto', @@ -5491,14 +5490,15 @@ const translations = { `cambió el espacio de trabajo a ${toPolicyName}${fromPolicyName ? ` (previamente ${fromPolicyName})` : ''}`, changeType: ({oldType, newType}: ChangeTypeParams) => `cambió type de ${oldType} a ${newType}`, delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `envié este informe a ${delegateUser} ya que ${originalManager} está de vacaciones`, - exportedToCSV: `exportó este informe a CSV`, + exportedToCSV: `exportado a CSV`, exportedToIntegration: { - automatic: ({label}: ExportedToIntegrationParams) => `exportó este informe a ${label}.`, - automaticActionOne: ({label}: ExportedToIntegrationParams) => `exportó automáticamente este informe a ${label} a través de la`, - automaticActionTwo: 'configuración contable.', + automatic: ({label}: ExportedToIntegrationParams) => `exportado a ${label}`, + automaticActionOne: ({label}: ExportedToIntegrationParams) => `exportado a ${label} mediante`, + automaticActionTwo: 'configuración contable', manual: ({label}: ExportedToIntegrationParams) => `marcó este informe como exportado manualmente a ${label}.`, - reimburseableLink: 'Ver los gastos por cuenta propia.', - nonReimbursableLink: 'Ver los gastos de la tarjeta de empresa.', + automaticActionThree: 'y creó un registro con éxito para', + reimburseableLink: 'Exportar gastos por cuenta propia como', + nonReimbursableLink: 'gastos de la tarjeta de empresa.', pending: ({label}: ExportedToIntegrationParams) => `comenzó a exportar este informe a ${label}...`, }, integrationsMessage: ({label, errorMessage, linkText, linkURL}: IntegrationSyncFailedParams) => diff --git a/src/languages/params.ts b/src/languages/params.ts index 8349a2d136ca..19f65ae876a3 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -176,9 +176,9 @@ type AdminCanceledRequestParams = {manager: string; amount: string}; type SettledAfterAddedBankAccountParams = {submitterDisplayName: string; amount: string}; -type PaidElsewhereWithAmountParams = {payer?: string; amount: string}; +type PaidElsewhereParams = {payer?: string} | undefined; -type PaidWithExpensifyWithAmountParams = {payer?: string; amount: string}; +type PaidWithExpensifyParams = {payer?: string} | undefined; type ThreadRequestReportNameParams = {formattedAmount: string; comment: string}; @@ -370,8 +370,6 @@ type UnshareParams = {to: string}; type StripePaidParams = {amount: string; currency: string}; -type UnapprovedParams = {amount: string}; - type RemoveMembersWarningPrompt = { memberName: string; ownerName: string; @@ -805,8 +803,8 @@ export type { OOOEventSummaryFullDayParams, OOOEventSummaryPartialDayParams, OurEmailProviderParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, + PaidElsewhereParams, + PaidWithExpensifyParams, ParentNavigationSummaryParams, PaySomeoneParams, PayerOwesAmountParams, @@ -886,7 +884,6 @@ export type { ShareParams, UnshareParams, StripePaidParams, - UnapprovedParams, RemoveMembersWarningPrompt, ApprovalWorkflowErrorParams, ConnectionNameParams, diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 6ffcb77a525c..d23a4a33f246 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -92,19 +92,14 @@ import { getDisplayNameForParticipant, getDowngradeWorkspaceMessage, getIcons, - getIOUApprovedMessage, getIOUForwardedMessage, - getIOUSubmittedMessage, - getIOUUnapprovedMessage, getMoneyRequestSpendBreakdown, getParticipantsAccountIDsForDisplay, getPolicyName, getReimbursementDeQueuedOrCanceledActionMessage, getReimbursementQueuedActionMessage, getRejectedReportMessage, - getReportAutomaticallyApprovedMessage, getReportAutomaticallyForwardedMessage, - getReportAutomaticallySubmittedMessage, getReportLastMessage, getReportName, getReportNotificationPreference, @@ -779,19 +774,19 @@ function getLastMessageTextForReport( ) { const wasSubmittedViaHarvesting = !isMarkAsClosedAction(lastReportAction) ? getOriginalMessage(lastReportAction)?.harvesting ?? false : false; if (wasSubmittedViaHarvesting) { - lastMessageTextFromReport = getReportAutomaticallySubmittedMessage(lastReportAction); + lastMessageTextFromReport = translateLocal('iou.automaticallySubmitted'); } else { - lastMessageTextFromReport = getIOUSubmittedMessage(lastReportAction); + lastMessageTextFromReport = translateLocal('iou.submitted'); } } else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.APPROVED)) { const {automaticAction} = getOriginalMessage(lastReportAction) ?? {}; if (automaticAction) { - lastMessageTextFromReport = getReportAutomaticallyApprovedMessage(lastReportAction); + lastMessageTextFromReport = translateLocal('iou.automaticallyApproved'); } else { - lastMessageTextFromReport = getIOUApprovedMessage(lastReportAction); + lastMessageTextFromReport = translateLocal('iou.approvedMessage'); } } else if (isUnapprovedAction(lastReportAction)) { - lastMessageTextFromReport = getIOUUnapprovedMessage(lastReportAction); + lastMessageTextFromReport = translateLocal('iou.unapproved'); } else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.FORWARDED)) { const {automaticAction} = getOriginalMessage(lastReportAction) ?? {}; if (automaticAction) { diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index f8b46abfb007..23443f970c6e 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1853,14 +1853,25 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry - | ReportAction - | ReportAction, - report?: Report, -) { - return translateLocal('iou.automaticallySubmittedAmount', {formattedAmount: getFormattedAmount(reportAction, report)}); -} - -function getIOUSubmittedMessage( - reportAction: - | ReportAction - | ReportAction - | ReportAction, - report?: Report, -) { - return translateLocal('iou.submittedAmount', {formattedAmount: getFormattedAmount(reportAction, report)}); -} - -function getReportAutomaticallyApprovedMessage(reportAction: ReportAction, report?: Report) { - return translateLocal('iou.automaticallyApprovedAmount', {amount: getFormattedAmount(reportAction, report)}); -} - -function getIOUUnapprovedMessage(reportAction: ReportAction, report?: Report) { - return translateLocal('iou.unapprovedAmount', {amount: getFormattedAmount(reportAction, report)}); -} - -function getIOUApprovedMessage(reportAction: ReportAction, report?: Report) { - return translateLocal('iou.approvedAmount', {amount: getFormattedAmount(reportAction, report)}); -} - /** * We pass the reportID as older FORWARDED actions do not have the amount & currency stored in the message * so we retrieve the amount from the report instead @@ -8859,11 +8842,11 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry, switch (originalMessage.paymentType) { case CONST.IOU.PAYMENT_TYPE.ELSEWHERE: - translationKey = hasMissingInvoiceBankAccount(IOUReportID) ? 'iou.payerSettledWithMissingBankAccount' : 'iou.paidElsewhereWithAmount'; + translationKey = hasMissingInvoiceBankAccount(IOUReportID) ? 'iou.payerSettledWithMissingBankAccount' : 'iou.paidElsewhere'; break; case CONST.IOU.PAYMENT_TYPE.EXPENSIFY: case CONST.IOU.PAYMENT_TYPE.VBBA: - translationKey = 'iou.paidWithExpensifyWithAmount'; + translationKey = 'iou.paidWithExpensify'; if (automaticAction) { translationKey = 'iou.automaticallyPaidWithExpensify'; } @@ -10878,9 +10861,6 @@ export { prepareOnboardingOnyxData, getIOUReportActionDisplayMessage, getIOUReportActionMessage, - getReportAutomaticallyApprovedMessage, - getIOUUnapprovedMessage, - getIOUApprovedMessage, getReportAutomaticallyForwardedMessage, getIOUForwardedMessage, getRejectedReportMessage, @@ -10888,8 +10868,6 @@ export { getDeletedTransactionMessage, getUpgradeWorkspaceMessage, getDowngradeWorkspaceMessage, - getReportAutomaticallySubmittedMessage, - getIOUSubmittedMessage, getIcons, getIconsForParticipants, getIndicatedMissingPaymentMethod, diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index 2d903dbc4b03..457f7cb171ea 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -85,18 +85,13 @@ import { getChildReportNotificationPreference as getChildReportNotificationPreferenceReportUtils, getDeletedTransactionMessage, getDowngradeWorkspaceMessage, - getIOUApprovedMessage, getIOUForwardedMessage, getIOUReportActionDisplayMessage, - getIOUSubmittedMessage, - getIOUUnapprovedMessage, getOriginalReportID, getReimbursementDeQueuedOrCanceledActionMessage, getReimbursementQueuedActionMessage, getRejectedReportMessage, - getReportAutomaticallyApprovedMessage, getReportAutomaticallyForwardedMessage, - getReportAutomaticallySubmittedMessage, getReportName, getReportPreviewMessage, getUpgradeWorkspaceMessage, @@ -563,19 +558,19 @@ const ContextMenuActions: ContextMenuAction[] = [ ) { const harvesting = !isMarkAsClosedAction(reportAction) ? getOriginalMessage(reportAction)?.harvesting ?? false : false; if (harvesting) { - setClipboardMessage(getReportAutomaticallySubmittedMessage(reportAction)); + setClipboardMessage(translateLocal('iou.automaticallySubmitted')); } else { - Clipboard.setString(getIOUSubmittedMessage(reportAction)); + Clipboard.setString(translateLocal('iou.submitted')); } } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.APPROVED)) { const {automaticAction} = getOriginalMessage(reportAction) ?? {}; if (automaticAction) { - setClipboardMessage(getReportAutomaticallyApprovedMessage(reportAction)); + setClipboardMessage(translateLocal('iou.automaticallyApproved')); } else { - Clipboard.setString(getIOUApprovedMessage(reportAction)); + Clipboard.setString(translateLocal('iou.approvedMessage')); } } else if (isUnapprovedAction(reportAction)) { - Clipboard.setString(getIOUUnapprovedMessage(reportAction)); + Clipboard.setString(translateLocal('iou.unapproved')); } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.FORWARDED)) { const {automaticAction} = getOriginalMessage(reportAction) ?? {}; if (automaticAction) { diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 68cddc093020..7b1be7bc6690 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -123,15 +123,10 @@ import { getDisplayNamesWithTooltips, getDowngradeWorkspaceMessage, getIconsForParticipants, - getIOUApprovedMessage, getIOUForwardedMessage, - getIOUSubmittedMessage, - getIOUUnapprovedMessage, getMovedTransactionMessage, getPolicyChangeMessage, getRejectedReportMessage, - getReportAutomaticallyApprovedMessage, - getReportAutomaticallySubmittedMessage, getUnreportedTransactionMessage, getUpgradeWorkspaceMessage, getWhisperDisplayNames, @@ -958,25 +953,25 @@ function PureReportActionItem({ if (wasSubmittedViaHarvesting) { children = ( - ${getReportAutomaticallySubmittedMessage(action, report)}`} /> + ${translate('iou.automaticallySubmitted')}`} /> ); } else { - children = ; + children = ; } } else if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.APPROVED)) { const wasAutoApproved = getOriginalMessage(action)?.automaticAction ?? false; if (wasAutoApproved) { children = ( - ${getReportAutomaticallyApprovedMessage(action, report)}`} /> + ${translate('iou.automaticallyApproved')}`} /> ); } else { - children = ; + children = ; } } else if (isUnapprovedAction(action)) { - children = ; + children = ; } else if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.FORWARDED)) { const wasAutoForwarded = getOriginalMessage(action)?.automaticAction ?? false; if (wasAutoForwarded) { diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index ec67f5340ff2..5d4ddadbf4ca 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -619,7 +619,7 @@ describe('ReportUtils', () => { }, } as ReportAction; - expect(getReportName(threadOfSubmittedReportAction, policy, submittedParentReportAction)).toBe('submitted $1.69'); + expect(getReportName(threadOfSubmittedReportAction, policy, submittedParentReportAction)).toBe('submitted'); }); test('Invited/Removed Room Member Action', () => {