Skip to content

Commit 3cc03ed

Browse files
committed
Revert "Merge pull request #60171 from nyomanjyotisa/issue-60035"
This reverts commit 7abe4cd, reversing changes made to e9cdd22.
1 parent 5217a34 commit 3cc03ed

File tree

10 files changed

+129
-100
lines changed

10 files changed

+129
-100
lines changed

src/CONST.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,8 @@ const CONST = {
11131113
COMPANY_CARDS_CONNECT_CREDIT_CARDS_HELP_URL: 'https://help.expensify.com/new-expensify/hubs/connect-credit-cards/',
11141114
CUSTOM_REPORT_NAME_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/spending-insights/Export-Expenses-And-Reports#formulas',
11151115
CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings',
1116-
CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL: 'https://help.expensify.com/articles/new-expensify/workspaces/Set-up-rules#configure-expense-report-rules',
1117-
SELECT_WORKFLOWS_HELP_URL: 'https://help.expensify.com/articles/new-expensify/workspaces/Set-up-workflows#select-workflows',
11181116
COPILOT_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Add-or-Act-As-a-Copilot',
1117+
DELAYED_SUBMISSION_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports',
11191118
ENCRYPTION_AND_SECURITY_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Encryption-and-Data-Security',
11201119
PLAN_TYPES_AND_PRICING_HELP_URL: 'https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Plan-types-and-pricing',
11211120
MERGE_ACCOUNT_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Merge-Accounts',

src/languages/en.ts

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ import type {
123123
OptionalParam,
124124
OurEmailProviderParams,
125125
OwnerOwesAmountParams,
126-
PaidElsewhereParams,
127-
PaidWithExpensifyParams,
126+
PaidElsewhereWithAmountParams,
127+
PaidWithExpensifyWithAmountParams,
128128
ParentNavigationSummaryParams,
129129
PayerOwesAmountParams,
130130
PayerOwesParams,
@@ -185,6 +185,7 @@ import type {
185185
ToValidateLoginParams,
186186
TransferParams,
187187
TrialStartedTitleParams,
188+
UnapprovedParams,
188189
UnapproveWithIntegrationWarningParams,
189190
UnshareParams,
190191
UntilTimeParams,
@@ -1046,8 +1047,8 @@ const translations = {
10461047
sendInvoice: ({amount}: RequestAmountParams) => `Send ${amount} invoice`,
10471048
submitAmount: ({amount}: RequestAmountParams) => `Submit ${amount}`,
10481049
submittedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `submitted ${formattedAmount}${comment ? ` for ${comment}` : ''}`,
1049-
submitted: `submitted`,
1050-
automaticallySubmitted: `submitted via <a href="${CONST.SELECT_WORKFLOWS_HELP_URL}">delay submissions</a>`,
1050+
automaticallySubmittedAmount: ({formattedAmount}: RequestedAmountMessageParams) =>
1051+
`automatically submitted ${formattedAmount} via <a href="${CONST.DELAYED_SUBMISSION_HELP_URL}">delayed submission</a>`,
10511052
trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `tracking ${formattedAmount}${comment ? ` for ${comment}` : ''}`,
10521053
splitAmount: ({amount}: SplitAmountParams) => `split ${amount}`,
10531054
didSplitAmount: ({formattedAmount, comment}: DidSplitAmountMessageParams) => `split ${formattedAmount}${comment ? ` for ${comment}` : ''}`,
@@ -1062,23 +1063,24 @@ const translations = {
10621063
managerApprovedAmount: ({manager, amount}: ManagerApprovedAmountParams) => `${manager} approved ${amount}`,
10631064
payerSettled: ({amount}: PayerSettledParams) => `paid ${amount}`,
10641065
payerSettledWithMissingBankAccount: ({amount}: PayerSettledParams) => `paid ${amount}. Add a bank account to receive your payment.`,
1065-
automaticallyApproved: `approved via <a href="${CONST.CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL}">workspace rules</a>`,
1066+
automaticallyApprovedAmount: ({amount}: ApprovedAmountParams) =>
1067+
`automatically approved ${amount} via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">workspace rules</a>`,
10661068
approvedAmount: ({amount}: ApprovedAmountParams) => `approved ${amount}`,
1067-
approvedMessage: `approved`,
1068-
unapproved: `unapproved`,
1069-
automaticallyForwardedAmount: ({amount}: ForwardedAmountParams) => `approved ${amount} via <a href="${CONST.CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL}">workspace rules</a>`,
1069+
unapprovedAmount: ({amount}: UnapprovedParams) => `unapproved ${amount}`,
1070+
automaticallyForwardedAmount: ({amount}: ForwardedAmountParams) =>
1071+
`automatically approved ${amount} via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">workspace rules</a>`,
10701072
forwardedAmount: ({amount}: ForwardedAmountParams) => `approved ${amount}`,
10711073
rejectedThisReport: 'rejected this report',
10721074
waitingOnBankAccount: ({submitterDisplayName}: WaitingOnBankAccountParams) => `started settling up. Payment is on hold until ${submitterDisplayName} adds a bank account.`,
1073-
adminCanceledRequest: ({manager}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceled the payment`,
1075+
adminCanceledRequest: ({manager, amount}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceled the ${amount} payment`,
10741076
canceledRequest: ({amount, submitterDisplayName}: CanceledRequestParams) =>
10751077
`canceled the ${amount} payment, because ${submitterDisplayName} did not enable their Expensify Wallet within 30 days`,
10761078
settledAfterAddedBankAccount: ({submitterDisplayName, amount}: SettledAfterAddedBankAccountParams) =>
10771079
`${submitterDisplayName} added a bank account. The ${amount} payment has been made.`,
1078-
paidElsewhere: ({payer}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}paid elsewhere`,
1079-
paidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) => `${payer ? `${payer} ` : ''}paid with Expensify`,
1080-
automaticallyPaidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) =>
1081-
`${payer ? `${payer} ` : ''}paid with Expensify via <a href="${CONST.CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL}">workspace rules</a>`,
1080+
paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} elsewhere`,
1081+
paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} with Expensify`,
1082+
automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) =>
1083+
`${payer ? `${payer} ` : ''}automatically paid ${amount} with Expensify via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">workspace rules</a>`,
10821084
noReimbursableExpenses: 'This report has an invalid amount',
10831085
pendingConversionMessage: "Total will update when you're back online",
10841086
changedTheExpense: 'changed the expense',
@@ -5483,15 +5485,14 @@ const translations = {
54835485
`changed the workspace to ${toPolicyName}${fromPolicyName ? ` (previously ${fromPolicyName})` : ''}`,
54845486
changeType: ({oldType, newType}: ChangeTypeParams) => `changed type from ${oldType} to ${newType}`,
54855487
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`,
5486-
exportedToCSV: `exported to CSV`,
5488+
exportedToCSV: `exported this report to CSV`,
54875489
exportedToIntegration: {
5488-
automatic: ({label}: ExportedToIntegrationParams) => `exported to ${label}`,
5489-
automaticActionOne: ({label}: ExportedToIntegrationParams) => `exported to ${label} via`,
5490-
automaticActionTwo: 'accounting settings',
5490+
automatic: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}.`,
5491+
automaticActionOne: ({label}: ExportedToIntegrationParams) => `automatically exported this report to ${label} via`,
5492+
automaticActionTwo: 'accounting settings.',
54915493
manual: ({label}: ExportedToIntegrationParams) => `marked this report as manually exported to ${label}.`,
5492-
automaticActionThree: 'and successfully created a record for',
5493-
reimburseableLink: 'out-of-pocket expenses',
5494-
nonReimbursableLink: 'company card expenses.',
5494+
reimburseableLink: 'View out-of-pocket expenses.',
5495+
nonReimbursableLink: 'View company card expenses.',
54955496
pending: ({label}: ExportedToIntegrationParams) => `started exporting this report to ${label}...`,
54965497
},
54975498
integrationsMessage: ({errorMessage, label, linkText, linkURL}: IntegrationSyncFailedParams) =>

src/languages/es.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ import type {
122122
OptionalParam,
123123
OurEmailProviderParams,
124124
OwnerOwesAmountParams,
125-
PaidElsewhereParams,
126-
PaidWithExpensifyParams,
125+
PaidElsewhereWithAmountParams,
126+
PaidWithExpensifyWithAmountParams,
127127
ParentNavigationSummaryParams,
128128
PayerOwesAmountParams,
129129
PayerOwesParams,
@@ -184,6 +184,7 @@ import type {
184184
ToValidateLoginParams,
185185
TransferParams,
186186
TrialStartedTitleParams,
187+
UnapprovedParams,
187188
UnapproveWithIntegrationWarningParams,
188189
UnshareParams,
189190
UntilTimeParams,
@@ -1041,8 +1042,8 @@ const translations = {
10411042
sendInvoice: ({amount}: RequestAmountParams) => `Enviar factura de ${amount}`,
10421043
submitAmount: ({amount}: RequestAmountParams) => `Solicitar ${amount}`,
10431044
submittedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `solicitó ${formattedAmount}${comment ? ` para ${comment}` : ''}`,
1044-
submitted: `enviado`,
1045-
automaticallySubmitted: `envió mediante <a href="${CONST.SELECT_WORKFLOWS_HELP_URL}">retrasar envíos</a>`,
1045+
automaticallySubmittedAmount: ({formattedAmount}: RequestedAmountMessageParams) =>
1046+
`se enviaron automáticamente ${formattedAmount} mediante <a href="${CONST.DELAYED_SUBMISSION_HELP_URL}">envío diferido</a>`,
10461047
trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `realizó un seguimiento de ${formattedAmount}${comment ? ` para ${comment}` : ''}`,
10471048
splitAmount: ({amount}: SplitAmountParams) => `dividir ${amount}`,
10481049
didSplitAmount: ({formattedAmount, comment}: DidSplitAmountMessageParams) => `dividió ${formattedAmount}${comment ? ` para ${comment}` : ''}`,
@@ -1057,24 +1058,24 @@ const translations = {
10571058
managerApprovedAmount: ({manager, amount}: ManagerApprovedAmountParams) => `${manager} aprobó ${amount}`,
10581059
payerSettled: ({amount}: PayerSettledParams) => `pagó ${amount}`,
10591060
payerSettledWithMissingBankAccount: ({amount}: PayerSettledParams) => `pagó ${amount}. Agrega una cuenta bancaria para recibir tu pago.`,
1060-
automaticallyApproved: `aprobó mediante <a href="${CONST.CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL}">reglas del espacio de trabajo</a>`,
1061+
automaticallyApprovedAmount: ({amount}: ApprovedAmountParams) =>
1062+
`aprobado automáticamente ${amount} según las <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">reglas del espacio de trabajo</a>`,
10611063
approvedAmount: ({amount}: ApprovedAmountParams) => `aprobó ${amount}`,
1062-
approvedMessage: `aprobado`,
1063-
unapproved: `no aprobado`,
1064+
unapprovedAmount: ({amount}: UnapprovedParams) => `desaprobó ${amount}`,
10641065
automaticallyForwardedAmount: ({amount}: ForwardedAmountParams) =>
1065-
`aprobó ${amount} mediante <a href="${CONST.CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL}">reglas del espacio de trabajo</a>`,
1066+
`aprobado automáticamente ${amount} según las <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">reglas del espacio de trabajo</a>`,
10661067
forwardedAmount: ({amount}: ForwardedAmountParams) => `aprobó ${amount}`,
10671068
rejectedThisReport: 'rechazó este informe',
10681069
waitingOnBankAccount: ({submitterDisplayName}: WaitingOnBankAccountParams) => `inició el pago, pero no se procesará hasta que ${submitterDisplayName} añada una cuenta bancaria`,
1069-
adminCanceledRequest: ({manager}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceló el pago`,
1070+
adminCanceledRequest: ({manager, amount}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceló el pago de ${amount}`,
10701071
canceledRequest: ({amount, submitterDisplayName}: CanceledRequestParams) =>
10711072
`canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu Billetera Expensify en un plazo de 30 días.`,
10721073
settledAfterAddedBankAccount: ({submitterDisplayName, amount}: SettledAfterAddedBankAccountParams) =>
10731074
`${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`,
1074-
paidElsewhere: ({payer}: PaidElsewhereParams = {}) => `${payer ? `${payer} ` : ''}pagó de otra forma`,
1075-
paidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) => `${payer ? `${payer} ` : ''}pagó con Expensify`,
1076-
automaticallyPaidWithExpensify: ({payer}: PaidWithExpensifyParams = {}) =>
1077-
`${payer ? `${payer} ` : ''}pagó con Expensify via <a href="${CONST.CONFIGURE_EXPENSE_REPORT_RULES_HELP_URL}">reglas del espacio de trabajo</a>`,
1075+
paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} de otra forma`,
1076+
paidWithExpensifyWithAmount: ({payer, amount}: PaidWithExpensifyWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} con Expensify`,
1077+
automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) =>
1078+
`${payer ? `${payer} ` : ''}auto-pagó ${amount} con Expensify via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">reglas del espacio de trabajo</a>`,
10781079
noReimbursableExpenses: 'El importe de este informe no es válido',
10791080
pendingConversionMessage: 'El total se actualizará cuando estés online',
10801081
changedTheExpense: 'cambió el gasto',
@@ -5538,15 +5539,14 @@ const translations = {
55385539
`cambió el espacio de trabajo a ${toPolicyName}${fromPolicyName ? ` (previamente ${fromPolicyName})` : ''}`,
55395540
changeType: ({oldType, newType}: ChangeTypeParams) => `cambió type de ${oldType} a ${newType}`,
55405541
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `envié este informe a ${delegateUser} ya que ${originalManager} está de vacaciones`,
5541-
exportedToCSV: `exportado a CSV`,
5542+
exportedToCSV: `exportó este informe a CSV`,
55425543
exportedToIntegration: {
5543-
automatic: ({label}: ExportedToIntegrationParams) => `exportado a ${label}`,
5544-
automaticActionOne: ({label}: ExportedToIntegrationParams) => `exportado a ${label} mediante`,
5545-
automaticActionTwo: 'configuración contable',
5544+
automatic: ({label}: ExportedToIntegrationParams) => `exportó este informe a ${label}.`,
5545+
automaticActionOne: ({label}: ExportedToIntegrationParams) => `exportó automáticamente este informe a ${label} a través de la`,
5546+
automaticActionTwo: 'configuración contable.',
55465547
manual: ({label}: ExportedToIntegrationParams) => `marcó este informe como exportado manualmente a ${label}.`,
5547-
automaticActionThree: 'y creó un registro con éxito para',
5548-
reimburseableLink: 'Exportar gastos por cuenta propia como',
5549-
nonReimbursableLink: 'gastos de la tarjeta de empresa.',
5548+
reimburseableLink: 'Ver los gastos por cuenta propia.',
5549+
nonReimbursableLink: 'Ver los gastos de la tarjeta de empresa.',
55505550
pending: ({label}: ExportedToIntegrationParams) => `comenzó a exportar este informe a ${label}...`,
55515551
},
55525552
integrationsMessage: ({label, errorMessage, linkText, linkURL}: IntegrationSyncFailedParams) =>

src/languages/params.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ type AdminCanceledRequestParams = {manager: string; amount: string};
171171

172172
type SettledAfterAddedBankAccountParams = {submitterDisplayName: string; amount: string};
173173

174-
type PaidElsewhereParams = {payer?: string} | undefined;
174+
type PaidElsewhereWithAmountParams = {payer?: string; amount: string};
175175

176-
type PaidWithExpensifyParams = {payer?: string} | undefined;
176+
type PaidWithExpensifyWithAmountParams = {payer?: string; amount: string};
177177

178178
type ThreadRequestReportNameParams = {formattedAmount: string; comment: string};
179179

@@ -365,6 +365,8 @@ type UnshareParams = {to: string};
365365

366366
type StripePaidParams = {amount: string; currency: string};
367367

368+
type UnapprovedParams = {amount: string};
369+
368370
type RemoveMembersWarningPrompt = {
369371
memberName: string;
370372
ownerName: string;
@@ -798,8 +800,8 @@ export type {
798800
OOOEventSummaryFullDayParams,
799801
OOOEventSummaryPartialDayParams,
800802
OurEmailProviderParams,
801-
PaidElsewhereParams,
802-
PaidWithExpensifyParams,
803+
PaidElsewhereWithAmountParams,
804+
PaidWithExpensifyWithAmountParams,
803805
ParentNavigationSummaryParams,
804806
PaySomeoneParams,
805807
PayerOwesAmountParams,
@@ -878,6 +880,7 @@ export type {
878880
ShareParams,
879881
UnshareParams,
880882
StripePaidParams,
883+
UnapprovedParams,
881884
RemoveMembersWarningPrompt,
882885
ApprovalWorkflowErrorParams,
883886
ConnectionNameParams,

src/libs/OptionsListUtils.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,20 @@ import {
9595
getDisplayNameForParticipant,
9696
getDowngradeWorkspaceMessage,
9797
getIcons,
98+
getIOUApprovedMessage,
9899
getIOUForwardedMessage,
100+
getIOUSubmittedMessage,
101+
getIOUUnapprovedMessage,
99102
getMoneyRequestSpendBreakdown,
100103
getParticipantsAccountIDsForDisplay,
101104
getPolicyChangeMessage,
102105
getPolicyName,
103106
getReimbursementDeQueuedOrCanceledActionMessage,
104107
getReimbursementQueuedActionMessage,
105108
getRejectedReportMessage,
109+
getReportAutomaticallyApprovedMessage,
106110
getReportAutomaticallyForwardedMessage,
111+
getReportAutomaticallySubmittedMessage,
107112
getReportLastMessage,
108113
getReportName,
109114
getReportNotificationPreference,
@@ -778,19 +783,19 @@ function getLastMessageTextForReport(
778783
) {
779784
const wasSubmittedViaHarvesting = !isMarkAsClosedAction(lastReportAction) ? getOriginalMessage(lastReportAction)?.harvesting ?? false : false;
780785
if (wasSubmittedViaHarvesting) {
781-
lastMessageTextFromReport = translateLocal('iou.automaticallySubmitted');
786+
lastMessageTextFromReport = getReportAutomaticallySubmittedMessage(lastReportAction);
782787
} else {
783-
lastMessageTextFromReport = translateLocal('iou.submitted');
788+
lastMessageTextFromReport = getIOUSubmittedMessage(lastReportAction);
784789
}
785790
} else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.APPROVED)) {
786791
const {automaticAction} = getOriginalMessage(lastReportAction) ?? {};
787792
if (automaticAction) {
788-
lastMessageTextFromReport = translateLocal('iou.automaticallyApproved');
793+
lastMessageTextFromReport = getReportAutomaticallyApprovedMessage(lastReportAction);
789794
} else {
790-
lastMessageTextFromReport = translateLocal('iou.approvedMessage');
795+
lastMessageTextFromReport = getIOUApprovedMessage(lastReportAction);
791796
}
792797
} else if (isUnapprovedAction(lastReportAction)) {
793-
lastMessageTextFromReport = translateLocal('iou.unapproved');
798+
lastMessageTextFromReport = getIOUUnapprovedMessage(lastReportAction);
794799
} else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.FORWARDED)) {
795800
const {automaticAction} = getOriginalMessage(lastReportAction) ?? {};
796801
if (automaticAction) {

0 commit comments

Comments
 (0)