Update how routing messages are displayed for DEW workspaces#84323
Conversation
🦜 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 diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 8a6be158..e09684a7 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1577,7 +1577,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'Wähle einen Arbeitsbereich',
- routedDueToDEW: (to: string) => `Report aufgrund des benutzerdefinierten Genehmigungsworkflows an ${to} weitergeleitet`,
+ routedDueToDEW: (to: string, reason?: string) => `Bericht an ${to}${reason ? `weil ${reason}` : ''} weitergeleitet`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? 'Stunde' : 'Stunden'} @ ${rate} / Stunde`,
hrs: 'Std.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 0b82ad79..697e440e 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1582,7 +1582,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'Choisir un espace de travail',
- routedDueToDEW: (to: string) => `note de frais transmise à ${to} en raison du flux d’approbation personnalisé`,
+ routedDueToDEW: (to: string, reason?: string) => `note de frais routée vers ${to}${reason ? `parce que ${reason}` : ''}`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? 'heure' : 'heures'} @ ${rate} / heure`,
hrs: 'h',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index d273792b..8593be55 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1574,7 +1574,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'Scegli uno spazio di lavoro',
- routedDueToDEW: (to: string) => `rendiconto instradato a ${to} a causa del flusso di approvazione personalizzato`,
+ routedDueToDEW: (to: string, reason?: string) => `report indirizzato a ${to}${reason ? `perché ${reason}` : ''}`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? 'ora' : 'ore'} @ ${rate} / ora`,
hrs: 'ore',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 0a811ba9..4c15c281 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1564,7 +1564,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'ワークスペースを選択',
- routedDueToDEW: (to: string) => `カスタム承認ワークフローにより、レポートは${to}に回付されました`,
+ routedDueToDEW: (to: string, reason?: string) => `レポートは${to}${reason ? `${reason} のため` : ''}に回付されました`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? '時間' : '時間'} @ ${rate} / 時間`,
hrs: '時間',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 6ffe1f3c..0a999fc0 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1572,7 +1572,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'Kies een werkruimte',
- routedDueToDEW: (to: string) => `rapport doorgestuurd naar ${to} vanwege aangepast goedkeuringsworkflow`,
+ routedDueToDEW: (to: string, reason?: string) => `rapport doorgestuurd naar ${to}${reason ? `omdat ${reason}` : ''}`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? 'uur' : 'uren'} @ ${rate} / uur`,
hrs: 'uur',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 5fac6256..1431ce97 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1571,7 +1571,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'Wybierz przestrzeń roboczą',
- routedDueToDEW: (to: string) => `raport skierowano do ${to} z powodu niestandardowego przepływu zatwierdzania`,
+ routedDueToDEW: (to: string, reason?: string) => `raport przekazany do ${to}${reason ? `bo ${reason}` : ''}`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? 'godzina' : 'godziny'} @ ${rate} / godzinę`,
hrs: 'godz.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index a441fe5c..8360615c 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1569,7 +1569,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: 'Escolha um workspace',
- routedDueToDEW: (to: string) => `relatório encaminhado para ${to} devido ao fluxo de aprovação personalizado`,
+ routedDueToDEW: (to: string, reason?: string) => `relatório encaminhado para ${to}${reason ? `porque ${reason}` : ''}`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? 'hora' : 'horas'} @ ${rate} / hora`,
hrs: 'h',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 3f3090d9..7017f6d2 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1539,7 +1539,7 @@ const translations: TranslationDeepObject<typeof en> = {
},
},
chooseWorkspace: '选择工作区',
- routedDueToDEW: (to: string) => `报表因自定义审批流程被转交给 ${to}`,
+ routedDueToDEW: (to: string, reason?: string) => `报表已转交给 ${to}${reason ? `因为 ${reason}` : ''}`,
timeTracking: {
hoursAt: (hours: number, rate: string) => `${hours} ${hours === 1 ? '小时' : '小时'},按 ${rate} / 小时`,
hrs: '小时',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 656bf89d4f
ℹ️ 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".
| }, | ||
| chooseWorkspace: 'Wähle einen Arbeitsbereich', | ||
| routedDueToDEW: (to: string) => `Report aufgrund des benutzerdefinierten Genehmigungsworkflows an ${to} weitergeleitet`, | ||
| routedDueToDEW: (to: string, reason?: string) => `Bericht weitergeleitet an ${to}${reason ? `weil ${reason}` : ''}`, |
There was a problem hiding this comment.
Insert separator before DEW reason in localized strings
The new DEW routing copy concatenates to and the reason fragment without a delimiter in several locales (same pattern as this line in de.ts, also present in fr.ts, it.ts, nl.ts, pl.ts, and pt-BR.ts), so when reason is provided the message renders as a single malformed token (e.g. ...user@example.comweil ...). This affects every routed message with a reason in those languages and should add a leading space (or locale-appropriate separator) before the conditional "because" phrase.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Yeah Polyglot parrot didn't preserve the spacing from the original, I'll update them all manually
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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
Looks like a flaky test |
|
Restarted the flaky test and it's passing now. |
|
🚧 @deetergp has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/deetergp in version: 9.3.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.33-5 🚀
|

Explanation of Change
Change how we display the submit report actions on DEW policy:
submittedactionFixed Issues
$ #84315
QA Steps
Important
Sign in to the following account to run QA: applausetester+rg_46@applause.expensifail.com, and use the workspace "Jujutsu Workspace" (
0C441392C1B6885C) to create a reportTests
Dev prerequisite use an account with a workspace that has a test DEW implementation enabled
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari