Skip to content

Commit 869cd0f

Browse files
authored
Merge pull request #58977 from twilight2294/issue/53386
Update NewDot report action copy to make it clear when the action is automatically (vs manually) initiated
2 parents 0f65a7e + 9361394 commit 869cd0f

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
@@ -5247,8 +5247,9 @@ const translations = {
52475247
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`,
52485248
exportedToCSV: `exported this report to CSV`,
52495249
exportedToIntegration: {
5250-
automaticOne: ({label}: ExportedToIntegrationParams) => `automatically exported this report to ${label} via`,
5251-
automaticTwo: 'accounting settings.',
5250+
automatic: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}.`,
5251+
automaticActionOne: ({label}: ExportedToIntegrationParams) => `automatically exported this report to ${label} via`,
5252+
automaticActionTwo: 'accounting settings.',
52525253
manual: ({label}: ExportedToIntegrationParams) => `marked this report as manually exported to ${label}.`,
52535254
reimburseableLink: 'View out-of-pocket expenses.',
52545255
nonReimbursableLink: 'View company card expenses.',

src/languages/es.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,8 +5301,9 @@ const translations = {
53015301
delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `envié este informe a ${delegateUser} ya que ${originalManager} está de vacaciones`,
53025302
exportedToCSV: `exportó este informe a CSV`,
53035303
exportedToIntegration: {
5304-
automaticOne: ({label}: ExportedToIntegrationParams) => `exportó automáticamente este informe a ${label} a través de la`,
5305-
automaticTwo: 'configuración contable.',
5304+
automatic: ({label}: ExportedToIntegrationParams) => `exportó este informe a ${label}.`,
5305+
automaticActionOne: ({label}: ExportedToIntegrationParams) => `exportó automáticamente este informe a ${label} a través de la`,
5306+
automaticActionTwo: 'configuración contable.',
53065307
manual: ({label}: ExportedToIntegrationParams) => `marcó este informe como exportado manualmente a ${label}.`,
53075308
reimburseableLink: 'Ver los gastos por cuenta propia.',
53085309
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)