Repository navigation
Show workspace name in per diem empty state for members - #103972
Conversation
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
I created this PR from an upstream branch because I don't have push access to your fork. To take over this branch and push updates, run: Then you can close this PR and open a new one from your fork. |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
The failing Analysis: refactor: thread hasCompletedGuidedSetupFlow through navigateToConciergeChat merged today at 09:30 UTC. It added a Evidence: This PR changes only Next step: Once |
|
🤖 Web test steps verification results: Verified as workspace admin: Per diem can be enabled with no rates, a member was invited, and the admin empty-state subtitle is unchanged. Could not verify the member-facing subtitle text (VERIFY 3/4) because that requires driving a second (member) account, which is unsupported in this single-session web harness.
|
|
@MelvinBot implement this Polyglot diff: #103972 (comment) |
| requestEmptyList: { | ||
| title: 'No per diem rates yet', | ||
| subtitle: "This workspace doesn't have any per diem rates, ask your Admin to add some.", | ||
| subtitle: (workspaceName: string) => `${workspaceName} doesn't have any per diem rates. Ask an admin to add some.`, |
There was a problem hiding this comment.
@MelvinBot If policy?.name is missing, the ?? '' fallback renders the subtitle with no subject (" doesn't have any per diem rates..."). The old copy read fine in that state, so this is a small regression for it.
Let's use fallback here as This workspace ...
There was a problem hiding this comment.
Done in dac2731. When the workspace name is missing, members now see "This workspace doesn't have any per diem rates. Ask an admin to add some."
subtitlenow takes an optionalworkspaceNamein every locale. It uses the named copy when a name is present and the "This workspace" copy when it isn't. Each locale's fallback keeps that locale's named sentence and swaps in its own word for "this workspace".DynamicIOURequestStepDestination.tsx:259now passespolicy?.namewithout the?? ''. An empty name also falls back.
Typecheck, lint, and spellcheck pass. I couldn't run oxfmt here, so I wrapped the lines by hand to match the 190-character limit.
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
I applied the Polyglot translation diff in 393473a. It updates the per diem empty-state The pushed changes match the Polyglot diff line for line. I did not run lint or spell checks locally because the tools are not set up in my checkout. CI will run them on this push. |
…ateWorkspaceName Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
I merged The The remaining failing check, |
|
@MelvinBot please set the PR body to the content in the details section below DetailsExplanation of ChangeWhen a workspace member opens the Per diem tab and the workspace has no per diem rates, the empty state said "This workspace…". Members can belong to several workspaces, so this change names the workspace instead.
Fixed Issues$ #103898 Tests// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
Offline testsN/A QA Steps// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
PR Author Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safari |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…ace name is missing Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
🦜 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 74ca7bd0..a641545e 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5104,8 +5104,8 @@ ${amount} für ${merchant} – ${date}`,
title: 'Noch keine Pauschalbeträge',
subtitle: (workspaceName?: string) =>
workspaceName
- ? `${workspaceName} hat keine Pauschalspesensätze. Bitten Sie eine Adminperson, einige hinzuzufügen.`
- : 'Dieser Workspace hat keine Pauschalspesensätze. Bitten Sie eine Adminperson, einige hinzuzufügen.',
+ ? `${workspaceName} hat keine Tagegeldsätze. Bitten Sie eine:n Admin, welche hinzuzufügen.`
+ : 'In diesem Workspace sind keine Tagegeldsätze vorhanden. Bitten Sie eine Administratorin oder einen Administrator, welche hinzuzufügen.',
adminSubtitle: 'Fügen Sie Pauschalen hinzu, um Ihre Ausgaben zu organisieren.',
},
importPerDiemRates: 'Tagespauschalen importieren',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 103cf3c0..8728a1f8 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -5180,8 +5180,8 @@ ${amount} για ${merchant} - ${date}`,
title: 'Δεν υπάρχουν ακόμη ημερήσια επιδόματα',
subtitle: (workspaceName?: string) =>
workspaceName
- ? `Το ${workspaceName} δεν έχει ημερήσιες αποζημιώσεις. Ζητήστε από έναν διαχειριστή να προσθέσει μερικές.`
- : 'Αυτός ο χώρος εργασίας δεν έχει ημερήσιες αποζημιώσεις. Ζητήστε από έναν διαχειριστή να προσθέσει μερικές.',
+ ? `Το ${workspaceName} δεν έχει καμία ημερήσια αποζημίωση. Ζητήστε από έναν διαχειριστή να προσθέσει μερικές.`
+ : 'Αυτός ο χώρος εργασίας δεν έχει καμία ημερήσια αποζημίωση. Ζητήστε από έναν διαχειριστή να προσθέσει μερικές.',
adminSubtitle: 'Προσθέστε ημερήσια επιδόματα για να οργανώσετε τις δαπάνες σας.',
},
},
diff --git a/src/languages/es.ts b/src/languages/es.ts
index a5d4e038..e1ace683 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -5026,8 +5026,8 @@ ${amount} para ${merchant} - ${date}`,
title: 'Aún no hay tasas de Per diem',
subtitle: (workspaceName?: string) =>
workspaceName
- ? `${workspaceName} no tiene ninguna tasa de per diem. Pídele a un administrador que añada alguna.`
- : 'Este espacio de trabajo no tiene ninguna tasa de per diem. Pídele a un administrador que añada alguna.',
+ ? `${workspaceName} no tiene ninguna tasa de per diem. Pide a una persona admin que añada algunas.`
+ : 'Este espacio de trabajo no tiene ninguna tasa de per diem. Pídele a una persona administradora que añada alguna.',
adminSubtitle: 'Añade tasas de per diem para organizar tus gastos.',
},
importPerDiemRates: 'Importar tasas de per diem',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index c6a852af..d2c6115b 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5111,7 +5111,7 @@ ${amount} pour ${merchant} - ${date}`,
subtitle: (workspaceName?: string) =>
workspaceName
? `${workspaceName} n’a aucun taux de per diem. Demandez à un administrateur d’en ajouter.`
- : 'Cet espace de travail n’a aucun taux de per diem. Demandez à un administrateur d’en ajouter.',
+ : 'Cet espace de travail n’a pas de taux de per diem. Demandez à un administrateur d’en ajouter.',
adminSubtitle: 'Ajoutez des taux de per diem pour organiser vos dépenses.',
},
importPerDiemRates: 'Importer des taux de per diem',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 98ea2bfe..073ec659 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5073,7 +5073,7 @@ ${amount} per ${merchant} - ${date}`,
subtitle: (workspaceName?: string) =>
workspaceName
? `${workspaceName} non ha nessuna tariffa di diaria. Chiedi a un amministratore di aggiungerne.`
- : 'Questo spazio di lavoro non ha nessuna tariffa di diaria. Chiedi a un amministratore di aggiungerne.',
+ : 'Questo spazio di lavoro non ha tariffe di diaria. Chiedi a un admin di aggiungerne.',
adminSubtitle: 'Aggiungi le tariffe giornaliere per organizzare le tue spese.',
},
importPerDiemRates: 'Importa tariffe di diaria',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 212c24f6..26415781 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5073,7 +5073,7 @@ ${amount} voor ${merchant} - ${date}`,
subtitle: (workspaceName?: string) =>
workspaceName
? `${workspaceName} heeft geen dagvergoedingen. Vraag een beheerder om er een paar toe te voegen.`
- : 'Deze workspace heeft geen dagvergoedingen. Vraag een beheerder om er een paar toe te voegen.',
+ : 'Deze workspace heeft geen dagvergoedingen. Vraag een admin om er een paar toe te voegen.',
adminSubtitle: 'Voeg dagvergoedingen toe om je uitgaven te organiseren.',
},
importPerDiemRates: 'Daggeldtarieven importeren',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index b5ffe2b9..23ea8f57 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5104,8 +5104,8 @@ ${amount} dla ${merchant} - ${date}`,
title: 'Nie ma jeszcze stawek diet',
subtitle: (workspaceName?: string) =>
workspaceName
- ? `${workspaceName} nie ma żadnych stawek diet. Poproś administratora, żeby je dodał.`
- : 'Ten obszar roboczy nie ma żadnych stawek diet. Poproś administratora, żeby je dodał.',
+ ? `${workspaceName} nie ma żadnych stawek diet. Poproś administratora, żeby dodał kilka.`
+ : 'W tym obszarze roboczym nie ma żadnych stawek ryczałtowych. Poproś administratora o dodanie kilku.',
adminSubtitle: 'Dodaj stawki diet, żeby uporządkować swoje wydatki.',
},
importPerDiemRates: 'Zaimportuj stawki diet',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 57e55a7a..3a45c032 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -5064,8 +5064,8 @@ ${amount} para ${merchant} - ${date}`,
title: 'Ainda não há diárias',
subtitle: (workspaceName?: string) =>
workspaceName
- ? `${workspaceName} não tem nenhuma taxa de diária. Peça para um administrador adicionar algumas.`
- : 'Este espaço de trabalho não tem nenhuma taxa de diária. Peça para um administrador adicionar algumas.',
+ ? `${workspaceName} não tem nenhuma diária configurada. Peça para um administrador adicionar algumas.`
+ : 'Este workspace não tem nenhuma diária cadastrada. Peça para um administrador adicionar algumas.',
adminSubtitle: 'Adicione diárias para organizar seus gastos.',
},
importPerDiemRates: 'Importar tarifas de diária',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index ebf5d993..1fd38744 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -4919,7 +4919,8 @@ ${amount},商户:${merchant} - 日期:${date}`,
},
requestEmptyList: {
title: '尚未设置每日津贴费率',
- subtitle: (workspaceName?: string) => (workspaceName ? `${workspaceName} 没有任何日津贴标准。请联系管理员添加一些。` : '此工作区没有任何日津贴标准。请联系管理员添加一些。'),
+ subtitle: (workspaceName?: string) =>
+ workspaceName ? `${workspaceName} 尚未设置任何每日津贴标准。请联系管理员添加。` : '此工作区尚未设置任何每日补贴标准。请联系管理员添加。',
adminSubtitle: '添加每日津贴标准,以整理您的支出。',
},
importPerDiemRates: '导入每日津贴费率',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
Fixed the failing
|
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
|
I updated the PR body with the content from your comment. I left out the outer |
| requestEmptyList: {title: '尚未设置每日津贴费率', subtitle: '此工作区尚未设置任何每日津贴费率,请联系管理员添加。', adminSubtitle: '添加每日津贴标准,以整理您的支出。'}, | ||
| requestEmptyList: { | ||
| title: '尚未设置每日津贴费率', | ||
| subtitle: (workspaceName?: string) => (workspaceName ? `${workspaceName} 没有任何日津贴标准。请联系管理员添加一些。` : '此工作区没有任何日津贴标准。请联系管理员添加一些。'), |
There was a problem hiding this comment.
@MelvinBot The Chinese subtitle says "日津贴标准" in both branches, while the rest of the per diem copy (and the previous string) uses "每日津贴". The "每" looks dropped, so the term is inconsistent and reads as a typo.
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
🤖 This PR is now marked as ready for review. Note: the |
|
@Eskalifer1 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] |
Eskalifer1
left a comment
There was a problem hiding this comment.
LGTM!
While working on PR i have found bug, already reported here: https://expensify.slack.com/archives/C049HHMV9SM/p1791976716321309
|
@MelvinBot merge main |
…ateWorkspaceName Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
@Eskalifer1 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] |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looks good, thank you. I will clean up the PR description for you slightly, since I know sometimes it's hard to edit it with Melvin.
|
(Neil's AI agent) The failing
Re-running the job should clear it. |
|
🚧 neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.10-0 🚀
|
|
No help site update is needed. This PR only changes the in-app empty-state message for members to name the workspace, and no help article quotes or describes that message. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.12-0 🚀
|
|
No help site update is needed. This PR only changes the in-app empty-state message for members to name the workspace, and no help article, including Per-Diem-Expenses.md, quotes or describes that message. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
When a workspace member opens the Per diem tab and the workspace has no per diem rates, the empty state said "This workspace…". Members can belong to several workspaces, so this change names the workspace instead.
workspace.perDiem.requestEmptyList.subtitlenow takes the workspace name in every locale. The English copy follows the marketing-approved wording: "[workspaceName] doesn't have any per diem rates. Ask an admin to add some."DynamicIOURequestStepDestinationpassespolicy?.nameto the member subtitle. The admin subtitle and the title stay the same.Fixed Issues
$ #103898
PROPOSAL: #103898 (comment)
Tests
[workspaceName] doesn't have any per diem rates. Ask an admin to add some.Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari