Skip to content

Commit 9361394

Browse files
authored
Fix automatic exported report actions message
1 parent 4750e38 commit 9361394

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

src/languages/en.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5243,8 +5243,9 @@ const translations = {
52435243
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`,
52445244
exportedToCSV: `exported this report to CSV`,
52455245
exportedToIntegration: {
5246-
automaticOne: ({label}: ExportedToIntegrationParams) => `automatically exported this report to ${label} via`,
5247-
automaticTwo: 'accounting settings.',
5246+
automatic: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}.`,
5247+
automaticActionOne: ({label}: ExportedToIntegrationParams) => `automatically exported this report to ${label} via`,
5248+
automaticActionTwo: 'accounting settings.',
52485249
manual: ({label}: ExportedToIntegrationParams) => `marked this report as manually exported to ${label}.`,
52495250
reimburseableLink: 'View out-of-pocket expenses.',
52505251
nonReimbursableLink: 'View company card expenses.',

src/languages/es.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5297,8 +5297,9 @@ const translations = {
52975297
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `envié este informe a ${delegateUser} ya que ${originalManager} está de vacaciones`,
52985298
exportedToCSV: `exportó este informe a CSV`,
52995299
exportedToIntegration: {
5300-
automaticOne: ({label}: ExportedToIntegrationParams) => `exportó automáticamente este informe a ${label} a través de la`,
5301-
automaticTwo: 'configuración contable.',
5300+
automatic: ({label}: ExportedToIntegrationParams) => `exportó este informe a ${label}.`,
5301+
automaticActionOne: ({label}: ExportedToIntegrationParams) => `exportó automáticamente este informe a ${label} a través de la`,
5302+
automaticActionTwo: 'configuración contable.',
53025303
manual: ({label}: ExportedToIntegrationParams) => `marcó este informe como exportado manualmente a ${label}.`,
53035304
reimburseableLink: 'Ver los gastos por cuenta propia.',
53045305
nonReimbursableLink: 'Ver los gastos de la tarjeta de empresa.',

src/libs/ReportActionsUtils.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,7 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry<ReportActio
17111711

17121712
const isPending = reportAction?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD;
17131713
const originalMessage = (getOriginalMessage(reportAction) ?? {}) as OriginalMessageExportIntegration;
1714-
const {label, markedManually} = originalMessage;
1714+
const {label, markedManually, automaticAction} = originalMessage;
17151715
const reimbursableUrls = originalMessage.reimbursableUrls ?? [];
17161716
const nonReimbursableUrls = originalMessage.nonReimbursableUrls ?? [];
17171717
const reportID = reportAction?.reportID;
@@ -1729,16 +1729,21 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry<ReportActio
17291729
text: translateLocal('report.actions.type.exportedToIntegration.manual', {label}),
17301730
url: '',
17311731
});
1732-
} else {
1732+
} else if (automaticAction) {
17331733
result.push({
1734-
text: translateLocal('report.actions.type.exportedToIntegration.automaticOne', {label}),
1734+
text: translateLocal('report.actions.type.exportedToIntegration.automaticActionOne', {label}),
17351735
url: '',
17361736
});
17371737
const url = CONST.HELP_DOC_LINKS[label as keyof typeof CONST.HELP_DOC_LINKS];
17381738
result.push({
1739-
text: translateLocal('report.actions.type.exportedToIntegration.automaticTwo'),
1739+
text: translateLocal('report.actions.type.exportedToIntegration.automaticActionTwo'),
17401740
url: url || '',
17411741
});
1742+
} else {
1743+
result.push({
1744+
text: translateLocal('report.actions.type.exportedToIntegration.automatic', {label}),
1745+
url: '',
1746+
});
17421747
}
17431748

17441749
if (reimbursableUrls.length === 1) {

0 commit comments

Comments
 (0)