Skip to content

[Payment due @ZhenjaHorbach] Render DELEGATESUBMIT report action as muted system message - #96766

Merged
Beamanator merged 14 commits into
mainfrom
cmartins-fixDelegateSubmitSystemMessage
Aug 13, 2026
Merged

[Payment due @ZhenjaHorbach] Render DELEGATESUBMIT report action as muted system message#96766
Beamanator merged 14 commits into
mainfrom
cmartins-fixDelegateSubmitSystemMessage

Conversation

@luacmartins

@luacmartins luacmartins commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

The DELEGATESUBMIT report action doesn't render properly. This PR fixes that

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/662898

Tests

  1. As an admin, set up a workflow where Report Approver A has a Vacation Delegate B who is not a member of the report's policy.
  2. Submit an expense report to Approver A while B is not on the policy.
  3. As any participant of the report, open the report and verify the DELEGATESUBMIT system message renders in the same muted/gray style as other system messages (e.g. "changed the approver to..."), with @originalManager and @delegate rendered as tappable mention pills.
  4. Verify the wording changes appropriately depending on viewer (original manager / delegate / third party).
  5. Verify the "can't approve own reports" scenario (delegate would be submitting to themselves) also renders correctly.
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests - no network-dependent behavior; the message is rendered from already-synced report action data.

QA Steps

Same as Tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English.
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. sibling ActionContentRouter branches for TAKE_CONTROL/REROUTE/REASSIGN_APPROVER are unaffected)
  • If new assets were added or existing ones were modified, I verified that assets are optimized and load correctly across platforms. (N/A - no new assets)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown. (N/A)
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.

Screenshots/Videos

Screenshot 2026-07-22 at 10 39 02 AM
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

The vacation-delegate reroute action had no branch in ActionContentRouter,
so it fell through to the default chat renderer and showed raw bold text
instead of matching other structural system messages.
@OSBotify

This comment has been minimized.

@luacmartins
luacmartins marked this pull request as ready for review August 7, 2026 18:51
@luacmartins
luacmartins requested review from a team as code owners August 7, 2026 18:51
@melvin-bot
melvin-bot Bot requested review from ZhenjaHorbach and removed request for a team August 7, 2026 18:51
@melvin-bot

melvin-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested review from a team, JmillsExpensify and parasharrajat and removed request for a team August 7, 2026 18:51
@melvin-bot

melvin-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

@parasharrajat Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@parasharrajat

Copy link
Copy Markdown
Member

who should review this @luacmartins?

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/libs/ReportActionsUtils.ts 79.17% <100.00%> (+0.17%) ⬆️
src/libs/SidebarUtils.ts 80.32% <50.00%> (-0.09%) ⬇️
src/libs/ReportNameUtils.ts 81.63% <25.00%> (-0.52%) ⬇️
...es/inbox/report/ContextMenu/ContextMenuActions.tsx 39.30% <0.00%> (-0.23%) ⬇️
...nbox/report/actionContents/ActionContentRouter.tsx 89.65% <28.57%> (-2.57%) ⬇️
... and 9 files with indirect coverage changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccd6e95654

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/pages/inbox/report/actionContents/ActionContentRouter.tsx Outdated
@luacmartins

Copy link
Copy Markdown
Contributor Author

Let's follow the order of assignment, so @ZhenjaHorbach

@luacmartins
luacmartins removed the request for review from parasharrajat August 7, 2026 19:05
@ZhenjaHorbach

ZhenjaHorbach commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
2026-08-12.15.07.10.mov
Android: mWeb Chrome
2026-08-12.15.07.10.mov
iOS: HybridApp
2026-08-12.15.04.47.mov
iOS: mWeb Safari
2026-08-12.15.03.17.mov
MacOS: Chrome / Safari
2026-08-12.15.02.06.mov

Comment thread src/libs/ReportActionsUtils.ts
Comment thread src/libs/ReportActionsUtils.ts
Comment thread src/languages/en.ts Outdated
Comment thread src/languages/en.ts Outdated
Comment thread src/types/onyx/OriginalMessage.ts Outdated

@JmillsExpensify JmillsExpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luacmartins

Copy link
Copy Markdown
Contributor Author

Updated

Comment thread src/pages/inbox/report/actionContents/ActionContentRouter.tsx
Comment thread src/languages/en.ts Outdated
Comment thread src/languages/en.ts Outdated
Comment thread src/languages/el.ts Outdated
automatic: 'Αυτόματο',
showing: 'Εμφανίζονται',
of: 'του',
// @context Carousel pagination counter showing the current item's position out of the total (e.g. "3 of 50").

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's return this string 😅

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 99c1ee609f6..55c7af4d6dd 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1721,15 +1721,15 @@ const translations: TranslationDeepObject<typeof en> = {
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
                 `Dieser Bericht wurde an <mention-user>@${originalManager}</mention-user> statt an Sie (deren Urlaubsvertretung) gesendet, weil Sie kein Mitglied der Richtlinie dieses Berichts sind`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Dieser Bericht wurde Ihnen anstelle Ihres Vertretenden im Urlaub <mention-user>@${delegate}</mention-user> gesendet, da diese Person kein Mitglied der Richtlinie dieses Berichts ist`,
+                `Dieser Bericht wurde Ihnen anstelle Ihrer Urlaubsvertretung <mention-user>@${delegate}</mention-user> gesendet, weil sie kein Mitglied der Richtlinie dieses Berichts ist.`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
                 `Dieser Bericht wurde an <mention-user>@${originalManager}</mention-user> statt an die Urlaubsvertretung <mention-user>@${delegate}</mention-user> gesendet, weil diese Person kein Mitglied der Richtlinie dieses Berichts ist`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
-                `Dieser Report wurde zur Genehmigung an <mention-user>@${originalManager}</mention-user> gesendet, da Sie Ihre eigenen Reports nicht genehmigen können`,
+                `Dieser Bericht wurde zur Genehmigung an <mention-user>@${originalManager}</mention-user> gesendet, da Sie Ihre eigenen Berichte nicht genehmigen können`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Dieser Bericht wurde Ihnen zur Genehmigung gesendet, da Ihre Urlaubsvertretung, <mention-user>@${delegate}</mention-user>, ihre eigenen Berichte nicht genehmigen kann`,
+                `Dieser Bericht wurde Ihnen zur Genehmigung gesendet, da Ihre Vertretung im Urlaub, <mention-user>@${delegate}</mention-user>, ihre eigenen Berichte nicht genehmigen kann.`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Dieser Bericht wurde zur Genehmigung an <mention-user>@${originalManager}</mention-user> gesendet, da ihre Urlaubsvertretung, <mention-user>@${delegate}</mention-user>, ihre eigenen Berichte nicht genehmigen kann`,
+                `Dieser Bericht wurde zur Genehmigung an <mention-user>@${originalManager}</mention-user> gesendet, da deren Urlaubsvertretung, <mention-user>@${delegate}</mention-user>, eigene Berichte nicht genehmigen kann`,
         },
         chooseWorkspace: 'Wähle einen Arbeitsbereich',
         routedDueToDEW: (to: string, reason?: string) => `Bericht weitergeleitet an ${to}${reason ? ` weil ${reason}` : ''}`,
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 03009c156e1..ec07617aa9b 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -320,7 +320,6 @@ const translations: TranslationDeepObject<typeof en> = {
         automatic: 'Αυτόματο',
         showing: 'Εμφανίζονται',
         of: 'του',
-        // @context Carousel pagination counter showing the current item's position out of the total (e.g. "3 of 50").
         currentOfTotal: ({current, total}: {current: number; total: number}) => `${current} από ${total}`,
         default: 'Προεπιλογή',
         update: 'Ενημέρωση',
@@ -1762,17 +1761,17 @@ const translations: TranslationDeepObject<typeof en> = {
             changedApproverMessage: (managerID: number) => `άλλαξε τον εγκρίνοντα σε <mention-user accountID="${managerID}"/>`,
             reassignedApproverMessage: (managerID: number) => `ανέθεσε εκ νέου τον εγκρίνοντα στον/στην <mention-user accountID="${managerID}"/> μέσω ενημέρωσης ροής εργασίας`,
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Αυτή η αναφορά στάλθηκε στον/στην <mention-user>@${originalManager}</mention-user> αντί σε εσάς (τον/την αναπληρωτή/αναπληρώτριά τους κατά τις διακοπές) επειδή δεν είστε μέλος της πολιτικής αυτής της αναφοράς`,
+                `Η αναφορά στάλθηκε στον/στην <mention-user>@${originalManager}</mention-user> αντί για εσάς (τον/την αναπληρωτή/τριά τους για διακοπές), επειδή δεν είστε μέλος της πολιτικής αυτής της αναφοράς`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Αυτή η αναφορά σας στάλθηκε αντί για τον αναπληρωτή σας διακοπών <mention-user>@${delegate}</mention-user>, επειδή δεν είναι μέλος της πολιτικής αυτής της αναφοράς`,
+                `Αυτή η αναφορά σας εστάλη αντί για τον αναπληρωτή διακοπών σας <mention-user>@${delegate}</mention-user> επειδή δεν είναι μέλος της πολιτικής αυτής της αναφοράς`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `Αυτή η αναφορά στάλθηκε στον/στην <mention-user>@${originalManager}</mention-user> αντί για τον/την αναπληρωτή/τριά τους για διακοπές <mention-user>@${delegate}</mention-user>, επειδή δεν είναι μέλος της πολιτικής αυτής της αναφοράς`,
+                `Αυτή η αναφορά στάλθηκε στον/στην <mention-user>@${originalManager}</mention-user> αντί για τον/την αναπληρωτή/τρια αδείας τους <mention-user>@${delegate}</mention-user>, επειδή δεν είναι μέλος του κανονισμού αυτής της αναφοράς`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
                 `Αυτή η αναφορά στάλθηκε στον/στην <mention-user>@${originalManager}</mention-user> για έγκριση, επειδή δεν μπορείτε να εγκρίνετε τις δικές σας αναφορές`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Αυτή η αναφορά σας στάλθηκε για έγκριση, επειδή ο Αντικαταστάτης Διακοπών σας, <mention-user>@${delegate}</mention-user>, δεν μπορεί να εγκρίνει τις δικές του αναφορές`,
+                `Αυτή η αναφορά σας στάλθηκε για έγκριση, επειδή ο εκπρόσωπός σας για άδεια, <mention-user>@${delegate}</mention-user>, δεν μπορεί να εγκρίνει τις δικές του αναφορές`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Αυτή η αναφορά στάλθηκε στον/στην <mention-user>@${originalManager}</mention-user> για έγκριση, καθώς ο/η αναπληρωτής/αναπληρώτριά τους για άδεια, <mention-user>@${delegate}</mention-user>, δεν μπορεί να εγκρίνει τις δικές του/της αναφορές`,
+                `Αυτή η αναφορά στάλθηκε στον/στη <mention-user>@${originalManager}</mention-user> για έγκριση, καθώς ο/η αναπληρωτής/-τριάς του/της, <mention-user>@${delegate}</mention-user>, δεν μπορεί να εγκρίνει τις δικές του/της αναφορές`,
             actions: {
                 addApprover: 'Προσθήκη εγκρίνων',
                 addApproverSubtitle: 'Προσθέστε έναν επιπλέον εγκρίνοντα στην υπάρχουσα ροή έγκρισης.',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index dbe74f8d359..56218ce0040 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1718,17 +1718,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: 'Elige una opción para cambiar el aprobador de estos informes.',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Este informe se envió a <mention-user>@${originalManager}</mention-user> en lugar de a ti (su delegado de vacaciones) porque no eres miembro de la política de este informe`,
+                `Este informe se envió a <mention-user>@${originalManager}</mention-user> en lugar de a ti (su sustituto de vacaciones) porque no eres miembro de la política de este informe`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Este informe se te envió a ti en lugar de a tu delegado de vacaciones <mention-user>@${delegate}</mention-user> porque no es miembro de la política de este informe`,
+                `Este informe se te envió a ti en lugar de a tu sustituto de vacaciones <mention-user>@${delegate}</mention-user> porque no es miembro de la política de este informe`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
                 `Este informe se envió a <mention-user>@${originalManager}</mention-user> en lugar de a su delegado de vacaciones <mention-user>@${delegate}</mention-user> porque no es miembro de la política de este informe`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
-                `Este informe se envió a <mention-user>@${originalManager}</mention-user> para su aprobación ya que tú no puedes aprobar tus propios informes`,
+                `Este informe se envió a <mention-user>@${originalManager}</mention-user> para su aprobación, ya que no puedes aprobar tus propios informes`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Este informe se te ha enviado para aprobación porque tu sustituto de vacaciones, <mention-user>@${delegate}</mention-user>, no puede aprobar sus propios informes`,
+                `Este informe se te envió para su aprobación porque tu delegado de vacaciones, <mention-user>@${delegate}</mention-user>, no puede aprobar sus propios informes`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Este informe se envió a <mention-user>@${originalManager}</mention-user> para su aprobación, ya que su delegado de vacaciones, <mention-user>@${delegate}</mention-user>, no puede aprobar sus propios informes`,
+                `Este informe se envió a <mention-user>@${originalManager}</mention-user> para su aprobación ya que su delegado de vacaciones, <mention-user>@${delegate}</mention-user>, no puede aprobar sus propios informes`,
         },
         chooseWorkspace: 'Elige un espacio de trabajo',
         routedDueToDEW: (to: string, reason?: string) => `informe enviado a ${to}${reason ? ` porque ${reason}` : ''}`,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 5e7715ac6bd..72d0256c68f 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1725,17 +1725,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: 'Choisissez une option pour changer l’approbateur de ces rapports.',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> au lieu de vous (son remplaçant pendant ses vacances), car vous n’êtes pas membre de la politique de cette note de frais`,
+                `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> au lieu de vous (son remplaçant de vacances), car vous n’êtes pas membre de la politique de cette note de frais`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Cette note de frais vous a été envoyée au lieu d’être adressée à votre remplaçant pour congés <mention-user>@${delegate}</mention-user>, car il n’est pas membre de la politique de cette note de frais`,
+                `Cette note de frais vous a été envoyée au lieu de votre remplaçant pendant les vacances <mention-user>@${delegate}</mention-user>, car il n’est pas membre de la politique de cette note de frais`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> au lieu de son remplaçant en congé <mention-user>@${delegate}</mention-user>, car il n’est pas membre de la politique de cette note de frais`,
+                `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> au lieu de son remplaçant de vacances <mention-user>@${delegate}</mention-user>, car cette personne n’est pas membre de la politique de cette note de frais`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
                 `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> pour approbation, car vous ne pouvez pas approuver vos propres notes de frais`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Cette note de frais vous a été envoyée pour approbation, car votre remplaçant pendant les vacances, <mention-user>@${delegate}</mention-user>, ne peut pas approuver ses propres notes de frais`,
+                `Cette note de frais vous a été envoyée pour approbation, car votre remplaçant pour congés, <mention-user>@${delegate}</mention-user>, ne peut pas approuver ses propres notes de frais`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> pour approbation, car sa personne déléguée pour les congés, <mention-user>@${delegate}</mention-user>, ne peut pas approuver ses propres notes de frais`,
+                `Cette note de frais a été envoyée à <mention-user>@${originalManager}</mention-user> pour approbation, car son délégué de congés, <mention-user>@${delegate}</mention-user>, ne peut pas approuver ses propres notes de frais`,
         },
         chooseWorkspace: 'Choisir un espace de travail',
         routedDueToDEW: (to: string, reason?: string) => `note de frais acheminée vers ${to}${reason ? ` parce que ${reason}` : ''}`,
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 305b4962374..b2fd3ba137b 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1718,17 +1718,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: "Scegli un'opzione per cambiare l'approvatore di questi report.",
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Questo rapporto è stato inviato a <mention-user>@${originalManager}</mention-user> invece che a te (il loro Sostituto per le ferie) perché non fai parte della polizza di questo rapporto`,
+                `Questo report è stato inviato a <mention-user>@${originalManager}</mention-user> invece che a te (il loro Delegato per le ferie) perché non fai parte della policy di questo report`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Questo resoconto è stato inviato a te invece che al tuo delegato per le vacanze <mention-user>@${delegate}</mention-user> perché non è un membro della policy di questo resoconto`,
+                `Questo report è stato inviato a te invece che al tuo delegato per le vacanze <mention-user>@${delegate}</mention-user> perché non è un membro della policy di questo report`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `Questo resoconto è stato inviato a <mention-user>@${originalManager}</mention-user> invece che al/dei suo/i sostituto/i per le ferie <mention-user>@${delegate}</mention-user> perché non fanno parte della polizza di questo resoconto`,
+                `Questo report è stato inviato a <mention-user>@${originalManager}</mention-user> invece che al/la suo/a delegato/a per le vacanze <mention-user>@${delegate}</mention-user> perché non è membro della policy di questo report`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
-                `Questo resoconto è stato inviato a <mention-user>@${originalManager}</mention-user> per l'approvazione perché tu non puoi approvare i tuoi resoconti`,
+                `Questo resoconto è stato inviato a <mention-user>@${originalManager}</mention-user> per l'approvazione, dato che non puoi approvare i tuoi stessi resoconti`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Questo rendiconto ti è stato inviato per l'approvazione perché il tuo sostituto per le ferie, <mention-user>@${delegate}</mention-user>, non può approvare i propri rendiconti`,
+                `Questo resoconto ti è stato inviato per l'approvazione perché il tuo delegato per le vacanze, <mention-user>@${delegate}</mention-user>, non può approvare i propri resoconti`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Questo resoconto è stato inviato a <mention-user>@${originalManager}</mention-user> per l’approvazione, dato che il suo delegato per le ferie, <mention-user>@${delegate}</mention-user>, non può approvare i propri resoconti`,
+                `Questo report è stato inviato a <mention-user>@${originalManager}</mention-user> per l'approvazione, dato che il/la suo/a Delegato/a per le ferie, <mention-user>@${delegate}</mention-user>, non può approvare i propri report`,
         },
         chooseWorkspace: 'Scegli uno spazio di lavoro',
         routedDueToDEW: (to: string, reason?: string) => `report indirizzato a ${to}${reason ? ` perché ${reason}` : ''}`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index ae555ae958e..8a7ae91caa4 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1700,17 +1700,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: 'これらのレポートの承認者を変更する方法を選択してください。',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `このレポートは、あなた(休暇代理人)ではなく、あなたの代わりに <mention-user>@${originalManager}</mention-user> に送信されました。あなたはこのレポートのポリシーのメンバーではないためです。`,
+                `このレポートは、あなた(休暇代理人)ではなく、あなたが所属していないこのレポートのポリシーのメンバーであるため、<mention-user>@${originalManager}</mention-user> に送信されました`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `このレポートは、休暇代理人の <mention-user>@${delegate}</mention-user> ではなくあなたに送信されました。このレポートのポリシーに、その代理人がメンバーとして参加していないためです。`,
+                `このレポートは、休暇代理人である <mention-user>@${delegate}</mention-user> がこのレポートのポリシーのメンバーではないため、代わりにあなたに送信されました`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `このレポートは、このレポートのポリシーのメンバーではないため、本来の休暇代理人である <mention-user>@${delegate}</mention-user> ではなく、<mention-user>@${originalManager}</mention-user> に送信されました`,
+                `このレポートは、このレポートのポリシーのメンバーではないため、休暇代理人の <mention-user>@${delegate}</mention-user> ではなく、<mention-user>@${originalManager}</mention-user> に送信されました`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
-                `あなたはご自身のレポートを承認できないため、このレポートは承認のために <mention-user>@${originalManager}</mention-user> さんに送信されました`,
+                `このレポートは、ご自身のレポートをご自身で承認することはできないため、承認のために <mention-user>@${originalManager}</mention-user> に送信されました`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
                 `このレポートは、休暇代理人の <mention-user>@${delegate}</mention-user> さんが自分のレポートを承認できないため、承認のためにあなたに送信されました`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `このレポートは、休暇代理人である <mention-user>@${delegate}</mention-user> さんは自分のレポートを承認できないため、承認のために <mention-user>@${originalManager}</mention-user> さんに送信されました`,
+                `このレポートは、休暇代理人である <mention-user>@${delegate}</mention-user> は自分のレポートを承認できないため、承認のために <mention-user>@${originalManager}</mention-user> に送信されました`,
         },
         chooseWorkspace: 'ワークスペースを選択',
         routedDueToDEW: (to: string, reason?: string) => `レポートは ${to}${reason ? ` ${reason} のため` : ''} に回覧されました`,
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index e8dd04b1da8..e961684ab8f 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1714,17 +1714,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: 'Kies een optie om de fiatteur voor deze rapporten te wijzigen.',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Dit rapport is naar <mention-user>@${originalManager}</mention-user> gestuurd in plaats van naar jou (hun vakantievervanger), omdat je geen lid bent van het beleid van dit rapport`,
+                `Dit rapport is naar <mention-user>@${originalManager}</mention-user> gestuurd in plaats van naar jou (hun Vakantievertegenwoordiger), omdat je geen lid bent van het beleid van dit rapport`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Dit rapport is naar jou gestuurd in plaats van naar je Vakantievertegenwoordiger <mention-user>@${delegate}</mention-user>, omdat die geen lid is van het beleid van dit rapport`,
+                `Dit rapport is naar jou gestuurd in plaats van naar je vakantiemandataris <mention-user>@${delegate}</mention-user>, omdat die geen lid is van het beleid van dit rapport`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `Dit rapport is naar <mention-user>@${originalManager}</mention-user> gestuurd in plaats van naar hun vervangende gemachtigde <mention-user>@${delegate}</mention-user>, omdat die geen lid is van het beleid van dit rapport`,
+                `Dit rapport is naar <mention-user>@${originalManager}</mention-user> gestuurd in plaats van naar hun vervangend manager <mention-user>@${delegate}</mention-user>, omdat die geen lid is van het beleid van dit rapport`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
-                `Dit rapport is ter goedkeuring verzonden naar <mention-user>@${originalManager}</mention-user>, omdat je je eigen rapporten niet kunt goedkeuren`,
+                `Dit rapport is ter goedkeuring naar <mention-user>@${originalManager}</mention-user> gestuurd, omdat je je eigen rapporten niet kunt goedkeuren`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Dit rapport is naar je gestuurd voor goedkeuring omdat je Vakantievervanger, <mention-user>@${delegate}</mention-user>, zijn of haar eigen rapporten niet kan goedkeuren`,
+                `Dit rapport is naar jou gestuurd voor goedkeuring omdat je Vakantieplaatsvervanger, <mention-user>@${delegate}</mention-user>, zijn of haar eigen rapporten niet kan goedkeuren`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Dit rapport is ter goedkeuring verzonden naar <mention-user>@${originalManager}</mention-user>, omdat hun vakantieplaatsvervanger, <mention-user>@${delegate}</mention-user>, hun eigen rapporten niet kan goedkeuren`,
+                `Dit rapport is ter goedkeuring naar <mention-user>@${originalManager}</mention-user> gestuurd, omdat hun vervanger tijdens vakantie, <mention-user>@${delegate}</mention-user>, hun eigen rapporten niet kan goedkeuren`,
         },
         chooseWorkspace: 'Kies een werkruimte',
         routedDueToDEW: (to: string, reason?: string) => `rapport doorgestuurd naar ${to}${reason ? ` omdat ${reason}` : ''}`,
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index ccc2f19b9d5..001bebb747e 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1710,17 +1710,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: 'Wybierz opcję, aby zmienić akceptującego dla tych raportów.',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user> zamiast do ciebie (jego Zastępcy na czas urlopu), ponieważ nie jesteś członkiem polityki tego raportu`,
+                `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user> zamiast do ciebie (twojego Zastępcy na czas urlopu), ponieważ nie jesteś członkiem polityki tego raportu`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Ten raport został wysłany do ciebie zamiast do twojego Zastępcy na czas urlopu <mention-user>@${delegate}</mention-user>, ponieważ nie jest on członkiem polityki tego raportu`,
+                `Ten raport został wysłany do ciebie zamiast do twojego zastępcy urlopowego <mention-user>@${delegate}</mention-user>, ponieważ nie jest on członkiem polityki tego raportu`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user> zamiast do jego zastępcy na czas urlopu <mention-user>@${delegate}</mention-user>, ponieważ nie jest on członkiem polityki tego raportu`,
+                `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user>, a nie do Zastępcy na czas urlopu <mention-user>@${delegate}</mention-user>, ponieważ nie jest on członkiem polityki tego raportu`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
                 `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user> do zatwierdzenia, ponieważ nie możesz zatwierdzać własnych raportów`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Ten raport został wysłany do ciebie do zatwierdzenia, ponieważ twój zastępca urlopowy, <mention-user>@${delegate}</mention-user>, nie może zatwierdzać własnych raportów`,
+                `Ten raport został wysłany do ciebie do zatwierdzenia, ponieważ twój Zastępca na czas urlopu, <mention-user>@${delegate}</mention-user>, nie może zatwierdzać swoich własnych raportów`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user> do zatwierdzenia, ponieważ jego Zastępca na czas urlopu, <mention-user>@${delegate}</mention-user>, nie może zatwierdzać własnych raportów`,
+                `Ten raport został wysłany do <mention-user>@${originalManager}</mention-user> do zatwierdzenia, ponieważ ich Zastępca na czas urlopu, <mention-user>@${delegate}</mention-user>, nie może zatwierdzać własnych raportów`,
         },
         chooseWorkspace: 'Wybierz przestrzeń roboczą',
         routedDueToDEW: (to: string, reason?: string) => `raport przekazany do ${to}${reason ? ` bo ${reason}` : ''}`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index e0da5472a90..b633a7f9232 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1713,17 +1713,17 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: 'Escolha uma opção para alterar o aprovador destes relatórios.',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> em vez de para você (o Delegado de Férias dele/dela) porque você não é membro da política deste relatório`,
+                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> em vez de para você (o Delegado de Férias) porque você não é membro da política deste relatório`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `Este relatório foi enviado para você em vez do seu delegante de férias <mention-user>@${delegate}</mention-user> porque ele não é membro da política deste relatório`,
+                `Este relatório foi enviado para você em vez do seu Delegado de Férias <mention-user>@${delegate}</mention-user> porque ele não é membro da política deste relatório`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> em vez do Delegado de Férias deles <mention-user>@${delegate}</mention-user> porque ele não é membro da política deste relatório`,
+                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> em vez de para o Delegado de Férias <mention-user>@${delegate}</mention-user> porque ele não é membro da política deste relatório`,
             delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) =>
-                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> para aprovação, já que você não pode aprovar seus próprios relatórios`,
+                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> para aprovação, pois você não pode aprovar seus próprios relatórios`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `Este relatório foi enviado para você para aprovação, pois o seu Delegado de Férias, <mention-user>@${delegate}</mention-user>, não pode aprovar os próprios relatórios`,
+                `Este relatório foi enviado para você para aprovação, pois seu Delegado de Férias, <mention-user>@${delegate}</mention-user>, não pode aprovar os próprios relatórios`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> para aprovação, já que o Delegado de Férias dele(a), <mention-user>@${delegate}</mention-user>, não pode aprovar os próprios relatórios`,
+                `Este relatório foi enviado para <mention-user>@${originalManager}</mention-user> para aprovação, já que o representante de férias dele(a), <mention-user>@${delegate}</mention-user>, não pode aprovar os próprios relatórios`,
         },
         chooseWorkspace: 'Escolha um workspace',
         routedDueToDEW: (to: string, reason?: string) => `relatório encaminhado para ${to}${reason ? ` porque ${reason}` : ''}`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 5632205b91f..94350b2abf5 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1657,16 +1657,16 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             bulkSubtitle: '选择一个选项来更改这些报表的审批人。',
             delegateSubmitNotOnPolicyForWingman: (originalManager: string) =>
-                `此报销单已发送给 <mention-user>@${originalManager}</mention-user>,而不是发送给你(其休假代理),因为你不是此报销单所属政策的成员`,
+                `该报表已发送给 <mention-user>@${originalManager}</mention-user>,而不是发送给你(他们的休假代理人),因为你不是此报表所属政策的成员`,
             delegateSubmitNotOnPolicyAsOriginalManager: (originalManager: string, delegate: string) =>
-                `由于你的休假代理人 <mention-user>@${delegate}</mention-user> 不是此报销单所属政策的成员,这份报销单被发送给了你本人`,
+                `此报表被发送给你,而不是你的休假代理人 <mention-user>@${delegate}</mention-user>,因为 TA 不是此报表所属政策的成员`,
             delegateSubmitNotOnPolicy: (originalManager: string, delegate: string) =>
-                `此报表已发送给 <mention-user>@${originalManager}</mention-user>,而非他们的休假代理人 <mention-user>@${delegate}</mention-user>,因为他们不是此报表所属政策的成员`,
-            delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) => `此报表已发送给 <mention-user>@${originalManager}</mention-user> 进行审批,因为你不能审批自己的报表`,
+                `此报表被发送给 <mention-user>@${originalManager}</mention-user>,而不是他们的假期代理人 <mention-user>@${delegate}</mention-user>,因为该代理人不是此报表所属策略的成员`,
+            delegateSubmitCannotApproveOwnReportForWingman: (originalManager: string) => `由于你不能审批自己的报销单,此报销单已发送给 <mention-user>@${originalManager}</mention-user> 审批`,
             delegateSubmitCannotApproveOwnReportAsOriginalManager: (delegate: string) =>
-                `此报表已发送给您审批,因为您的休假代理人 <mention-user>@${delegate}</mention-user> 无法审批自己的报表`,
+                `由于你的休假代理人 <mention-user>@${delegate}</mention-user> 无法审批自己的报销单,因此此报销单已发送给你审批`,
             delegateSubmitCannotApproveOwnReport: (originalManager: string, delegate: string) =>
-                `由于其休假代理人 <mention-user>@${delegate}</mention-user> 无法审批自己的报销报告,此报销报告已发送给 <mention-user>@${originalManager}</mention-user> 审批`,
+                `此报销单已发送给 <mention-user>@${originalManager}</mention-user> 审批,因为其休假代理人 <mention-user>@${delegate}</mention-user> 不能审批自己提交的报销单`,
         },
         chooseWorkspace: '选择工作区',
         routedDueToDEW: (to: string, reason?: string) => `报销单已转交给 ${to}${reason ? ` 因为 ${reason}` : ''}`,

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@luacmartins

Copy link
Copy Markdown
Contributor Author

Updated

Comment thread src/libs/SidebarUtils.ts Outdated
Comment thread src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx Outdated
@luacmartins

Copy link
Copy Markdown
Contributor Author

Updated

@ZhenjaHorbach

ZhenjaHorbach commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Now everything is good!

Снимок экрана — 2026-08-13 в 14 10 30

@melvin-bot
melvin-bot Bot requested a review from Beamanator August 13, 2026 12:12
@melvin-bot

melvin-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

@Beamanator Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot changed the title Render DELEGATESUBMIT report action as muted system message [Payment due @ZhenjaHorbach] Render DELEGATESUBMIT report action as muted system message Aug 13, 2026
@melvin-bot

melvin-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

🎯 @ZhenjaHorbach, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/662898.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@Beamanator Beamanator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Beamanator
Beamanator merged commit 634d178 into main Aug 13, 2026
48 of 50 checks passed
@Beamanator
Beamanator deleted the cmartins-fixDelegateSubmitSystemMessage branch August 13, 2026 19:27
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants