Repository navigation
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
Need confirmation for the translation for the error message and then run the parrot 🙏 |
|
I'm off next week, @TMisiukiewicz will take care of this PR. |
…issing-unit-error
🦜 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 c7e2a8e9..a2ac9159 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5034,6 +5034,7 @@ ${amount} für ${merchant} – ${date}`,
editPerDiemRates: 'Pauschalvergütungssätze bearbeiten',
editDestinationSubtitle: (destination: string) => `Wenn Sie dieses Ziel aktualisieren, wird es für alle ${destination}-Tagespauschalen-Teilbeträge geändert.`,
editCurrencySubtitle: (destination: string) => `Wenn Sie diese Währung aktualisieren, wird sie für alle ${destination}-Tagesgeld-Teilbeträge geändert.`,
+ missingPerDiemUnit: 'Per Diem ist in diesem Workspace nicht korrekt eingerichtet. Bitte wenden Sie sich für Hilfe an Concierge.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Legen Sie fest, wie aus eigener Tasche bezahlte Ausgaben nach QuickBooks Desktop exportiert werden.',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 58b75f9c..69b86161 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -5105,6 +5105,7 @@ ${amount} για ${merchant} - ${date}`,
subtitle: 'Αυτός ο χώρος εργασίας δεν έχει ημερήσια επιδόματα· ζητήστε από τον διαχειριστή σας να προσθέσει κάποια.',
adminSubtitle: 'Προσθέστε ημερήσια επιδόματα για να οργανώσετε τις δαπάνες σας.',
},
+ missingPerDiemUnit: 'Το ημερήσιο επίδομα δεν έχει ρυθμιστεί σωστά σε αυτόν τον χώρο εργασίας. Παρακαλούμε επικοινωνήστε με το Concierge για βοήθεια.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Ορίστε πώς θα εξαχθούν οι εκτός τσέπης δαπάνες στο QuickBooks Desktop.',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 059f2f0b..c7c925cc 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -4956,6 +4956,7 @@ ${amount} para ${merchant} - ${date}`,
editPerDiemRates: 'Editar las tasas de per diem',
editDestinationSubtitle: (destination) => `Actualizar este destino lo modificará para todas las subtasas per diem de ${destination}.`,
editCurrencySubtitle: (destination) => `Actualizar esta moneda la modificará para todas las subtasas per diem de ${destination}.`,
+ missingPerDiemUnit: 'El per diem no está configurado correctamente en este espacio de trabajo. Ponte en contacto con Concierge para obtener ayuda.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Establezca cómo se exportan los gastos de bolsillo a QuickBooks Desktop.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index d9ffc721..2cb25846 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5040,6 +5040,7 @@ ${amount} pour ${merchant} - ${date}`,
editPerDiemRates: 'Modifier les taux de per diem',
editDestinationSubtitle: (destination: string) => `La mise à jour de cette destination la modifiera pour tous les sous-taux de per diem ${destination}.`,
editCurrencySubtitle: (destination: string) => `La mise à jour de cette devise la modifiera pour tous les sous-taux de per diem de ${destination}.`,
+ missingPerDiemUnit: 'Le per diem n’est pas configuré correctement sur cet espace de travail. Veuillez contacter Concierge pour obtenir de l’aide.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Définissez comment les dépenses hors poche sont exportées vers QuickBooks Desktop.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 7731e58e..fe342e5c 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5002,6 +5002,7 @@ ${amount} per ${merchant} - ${date}`,
editPerDiemRates: 'Modifica le tariffe di diaria',
editDestinationSubtitle: (destination: string) => `L’aggiornamento di questa destinazione la modificherà per tutte le sottotariffe di diaria ${destination}.`,
editCurrencySubtitle: (destination: string) => `L’aggiornamento di questa valuta la modificherà per tutte le sottotariffe di diaria ${destination}.`,
+ missingPerDiemUnit: 'Il per diem non è configurato correttamente in questo workspace. Contatta Concierge per ricevere aiuto.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Imposta come esportare le spese anticipate in QuickBooks Desktop.',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 11390508..6b745f51 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -4966,6 +4966,7 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
editPerDiemRates: '日当レートを編集',
editDestinationSubtitle: (destination: string) => `この行き先を更新すると、すべての ${destination} 日当サブレートに適用されます。`,
editCurrencySubtitle: (destination: string) => `この通貨を更新すると、すべての${destination}の日当サブレートの通貨が変更されます。`,
+ missingPerDiemUnit: 'このワークスペースでは日当が正しく設定されていません。ヘルプが必要な場合は Concierge までお問い合わせください。',
},
qbd: {
exportOutOfPocketExpensesDescription: '自己負担経費を QuickBooks Desktop にエクスポートする方法を設定します。',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c75f66c9..cb37a2e5 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5002,6 +5002,7 @@ ${amount} voor ${merchant} - ${date}`,
editPerDiemRates: 'Dagvergoedingen bewerken',
editDestinationSubtitle: (destination: string) => `Als je deze bestemming bijwerkt, wordt deze gewijzigd voor alle per diem-deeltarieven van ${destination}.`,
editCurrencySubtitle: (destination: string) => `Als u deze valuta bijwerkt, wordt deze gewijzigd voor alle ${destination} daggeldsubtarieven.`,
+ missingPerDiemUnit: 'Per diem is niet goed ingesteld in deze workspace. Neem contact op met Concierge voor hulp.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Stel in hoe contante uitgaven worden geëxporteerd naar QuickBooks Desktop.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 24c6e373..27ab44d4 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5031,6 +5031,7 @@ ${amount} dla ${merchant} - ${date}`,
editPerDiemRates: 'Edytuj stawki diet',
editDestinationSubtitle: (destination: string) => `Zaktualizowanie tego miejsca docelowego zmieni je dla wszystkich podstawek diet ${destination}.`,
editCurrencySubtitle: (destination: string) => `Zaktualizowanie tej waluty spowoduje jej zmianę dla wszystkich podrzędnych stawek diet w ${destination}.`,
+ missingPerDiemUnit: 'Dieta nie jest poprawnie skonfigurowana w tym workspace. Skontaktuj się z Concierge, żeby uzyskać pomoc.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Ustaw sposób eksportu wydatków z własnej kieszeni do QuickBooks Desktop.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 6932fb13..c648f8a6 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -4994,6 +4994,7 @@ ${amount} para ${merchant} - ${date}`,
editPerDiemRates: 'Editar diárias',
editDestinationSubtitle: (destination: string) => `Atualizar este destino irá alterá-lo para todas as subdiárias de ${destination}.`,
editCurrencySubtitle: (destination: string) => `Atualizar esta moeda irá alterá-la para todas as subdiárias de ${destination}.`,
+ missingPerDiemUnit: 'O per diem não está configurado corretamente neste workspace. Fale com o Concierge para obter ajuda.',
},
qbd: {
exportOutOfPocketExpensesDescription: 'Defina como as despesas reembolsáveis serão exportadas para o QuickBooks Desktop.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index fd490a4f..262e8f64 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -4848,6 +4848,7 @@ ${amount},商户:${merchant} - 日期:${date}`,
editPerDiemRates: '编辑每日津贴费率',
editDestinationSubtitle: (destination: string) => `更新此目的地将会更改所有 ${destination} 按日津贴子费率的设置。`,
editCurrencySubtitle: (destination: string) => `更新此货币将会更改所有 ${destination} 的每日津贴子费率。`,
+ missingPerDiemUnit: '此工作区的每日津贴设置不正确。请联系 Concierge 获取帮助。',
},
qbd: {
exportOutOfPocketExpensesDescription: '设置自掏腰包报销如何导出到 QuickBooks Desktop。',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
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. |
| name: SCREENS.WORKSPACE.PER_DIEM_IMPORTED, | ||
| params: {policyID: POLICY_ID}, | ||
| }; | ||
| // The screen does not read navigation; this inert test double only satisfies the navigator-provided prop. |
There was a problem hiding this comment.
❌ CONSISTENCY-15 (docs)
The comment joins two independent sentences with a semicolon, which the plain-comment-style rule calls out. Comments should read as plain, natural sentences rather than semicolon-joined clauses.
Split it into two sentences:
// The screen does not read navigation. This inert test double only satisfies the navigator-provided prop.
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
const navigation = {} as ImportedPerDiemPageScreenProps['navigation'];Reviewed at: 2508db1 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
trjExpensify
left a comment
There was a problem hiding this comment.
@mountiny (and maybe @twisterdotcom), why don't workspaces with Per Diem all have
PerDiemInternational custom unit? How do workspaces end up like that, and should we be rectifying that with a migration instead of coding around it with error messages like this:
"Per diem isn't set up correctly on this workspace. Please reach out to Concierge for help."
|
@BartekObudzinski Please tag me when the PR is ready for review. |
|
Yeah I agree that we should make sure we clear up the data that is in wrong state, based on https://github.com/Expensify/Web-Expensify/pull/56337 @hungvu193 the gap where such policies were created is closed so we should be able to find policies where arePerDiemsEnabled is true and they do not have this per diem field set and fix it |
|
@hungvu193 is that the only path such policies been created through? |
…issing-unit-error
Yeah. But we already closed the gap. |
|
@huult can you review please? 🙏 |
|
@TMisiukiewicz could you sync with main? |
…issing-unit-error
|
done! |
|
@MelvinBot review this |
Code reviewThe change looks correct. I found no blocking issues.
Optional suggestion: Users see the error only after they upload a file and map every column. You could check for the unit at the entry point in I reviewed the code only and did not run the test steps. |
We did the migration for this a long time ago, so they absolutely should. |
|
Cool, so I think we need to query and do another migration then? |
|
Since the affected policies will be fixed with a migration, do we still need this safeguard? @mountiny @trjExpensify |
|
Since the affected policies will be fixed with a migration, do we still need this safeguard in the app? @mountiny @trjExpensify |
|
@huult yeah I think we put this in place and remove once the policies are migrated because we dont have this migration ready yet |
|
@MelvinBot, can you create an internal issue to backfill the PerDiemInternational in policies where it's missing? |
|
I created an internal issue to backfill the The issue covers how to find the affected workspaces, how to check that no new ones appear, how to back up and test the backfill, and how to confirm it worked. When the backfill is done, you can remove the temporary error that this PR adds. The issue has no assignee yet. |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-10-16.at.09.27.33.mov |
|
🚧 Julesssss 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/Julesssss in version: 9.5.15-1 🚀
|
|
No help site update is needed. This PR only adds an in-app error to the per diem import page for a rare broken workspace setup, and the error message explains itself. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Some workspaces have per diem turned on, but they do not have a
Per Diem Internationalcustom unit. On these workspaces, the import of per diem rates stopped and showed nothing to the user.This PR adds a validation error to the import page when the unit is missing. The error tells the user to contact Concierge. The App does not send the import request.
The backend fix in Web-Expensify#56337 stops new workspaces from getting into this state.
This PR adds only the English text. The translation action adds the other languages.
Fixed Issues
$ #101066
PROPOSAL: #101066 (comment)
Tests
You cannot make this workspace state from the UI. Step 3 makes it in the local cache only.
ImportPerDiemRatesrequest.Offline tests
The check runs in the App, so the result is the same when you are offline.
QA Steps
QA cannot make a workspace in this state on staging. The unit test in
tests/ui/ImportedPerDiemPageTest.tsxcovers the error.Do these steps to make sure that the import still works:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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