Repository navigation
Conversation
|
@eVoloshchak 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] |
🦜 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 c80404a5..adc364a5 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1527,6 +1527,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `setze ${field} auf „${value}“` : `${field} zu „${value}“`;
},
format: (fragments: string, route: string) => `${fragments} über <a href="${route}">Workspace-Regeln</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `Beschreibung auf „${value}“ festlegen` : `Beschreibung zu „${value}“`),
},
duplicateNonDefaultWorkspacePerDiemError:
'Sie können Per-Diem-Ausgaben nicht über mehrere Workspaces hinweg duplizieren, da sich die Sätze zwischen den Workspaces unterscheiden können.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 61d69123..469a80b1 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1533,6 +1533,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `définir ${field} sur « ${value} »` : `${field} à « ${value} »`;
},
format: (fragments: string, route: string) => `${fragments} via les <a href="${route}">règles de l’espace de travail</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `définir la description sur « ${value} »` : `description à « ${value} »`),
},
duplicateNonDefaultWorkspacePerDiemError:
'Vous ne pouvez pas dupliquer les indemnités journalières entre plusieurs espaces de travail, car les taux peuvent différer d’un espace de travail à l’autre.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 8058d5b9..adb65350 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1524,6 +1524,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `imposta ${field} su "${value}"` : `${field} a "${value}"`;
},
format: (fragments: string, route: string) => `${fragments} tramite le <a href="${route}">regole dello spazio di lavoro</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `imposta la descrizione su "${value}"` : `descrizione in “${value}”`),
},
duplicateNonDefaultWorkspacePerDiemError: 'Non puoi duplicare le spese di diaria tra diversi spazi di lavoro perché le tariffe potrebbero essere diverse tra gli spazi di lavoro.',
},
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index d4af68a8..2dcb668d 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1518,6 +1518,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `${field} を「${value}」に設定する` : `${field} から「${value}」へ`;
},
format: (fragments: string, route: string) => `${fragments}(<a href="${route}">ワークスペースルール</a>経由)`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `説明を「${value}」に設定` : `説明を「${value}」に設定`),
},
duplicateNonDefaultWorkspacePerDiemError: 'ワークスペースごとに日当レートが異なる場合があるため、日当経費をワークスペース間で複製することはできません。',
},
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 7993ff37..0a603e75 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1523,6 +1523,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `stel de ${field} in op "${value}"` : `${field} naar "${value}"`;
},
format: (fragments: string, route: string) => `${fragments} via <a href="${route}">werkruimteregels</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `stel de beschrijving in op ‘${value}’` : `beschrijving naar "${value}"`),
},
duplicateNonDefaultWorkspacePerDiemError: 'Je kunt dagvergoedingen niet dupliceren tussen werkruimtes, omdat de tarieven per werkruimte kunnen verschillen.',
},
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 94515332..2028b2e3 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1522,6 +1522,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `ustaw ${field} na „${value}”` : `${field} na „${value}”`;
},
format: (fragments: string, route: string) => `${fragments} przez <a href="${route}">zasady przestrzeni roboczej</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `ustaw opis na „${value}”` : `opis na „${value}”`),
},
duplicateNonDefaultWorkspacePerDiemError:
'Nie możesz duplikować wydatków z tytułu diet między przestrzeniami roboczymi, ponieważ stawki mogą się różnić między poszczególnymi przestrzeniami.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 8f2b6410..447c92c5 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1520,6 +1520,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `defina ${field} como "${value}"` : `${field} para "${value}"`;
},
format: (fragments: string, route: string) => `${fragments} via <a href="${route}">regras do espaço de trabalho</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `definir a descrição como "${value}"` : `descrição para "${value}"`),
},
duplicateNonDefaultWorkspacePerDiemError: 'Você não pode duplicar despesas de diárias entre espaços de trabalho porque as tarifas podem variar entre eles.',
},
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index f3a6ef79..21f87ad1 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -1498,6 +1498,7 @@ const translations: TranslationDeepObject<typeof en> = {
return isFirst ? `将 ${field} 设置为“${value}”` : `${field} 至 “${value}”`;
},
format: (fragments: string, route: string) => `${fragments} 通过 <a href="${route}">工作区规则</a>`,
+ description: (value: string, isFirst: boolean) => (isFirst ? `将描述设置为“${value}”` : `描述为“${value}”`),
},
duplicateNonDefaultWorkspacePerDiemError: '您无法在不同工作区之间复制每日津贴报销,因为各工作区的补贴标准可能不同。',
},
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Code Review - Inline Feedbacksrc/types/onyx/OriginalMessage.tsIssue: Type Redundancy The PolicyRulesModifiedFields type now contains both /** The value that the comment was changed to */
comment?: string;
/** The value that the description was changed to */
description?: string;Problem: This creates confusion about which field should be used. Based on the implementation in ModifiedExpenseMessage.ts, the backend sends Recommendation: Remove the |
|
This is already handled in #82325 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8472ba69f6
ℹ️ 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".
| } | ||
|
|
||
| if (key === 'comment') { | ||
| return translate('iou.policyRulesModifiedFields.description', updatedValue, isFirst); |
There was a problem hiding this comment.
Add missing locale entries for policyRulesModifiedFields.description
This branch now calls translate('iou.policyRulesModifiedFields.description', ...), but the commit only adds that key in src/languages/en.ts; the other locale files under src/languages still define policyRulesModifiedFields without description. For users on non-English locales, a policy-rule update that comes through the comment field will hit a missing translation path, which translate() treats as an error (throwing in dev and falling back to raw key text in production), so the modified-expense system message is broken in those locales.
Useful? React with 👍 / 👎.
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.
|
Explanation of Change
We dont want to render 'comment', but instead, 'description'
Fixed Issues
$ #82241
Tests
Create a new merchant rule that matches "Merchant" and updates description to "Hello"
Create a new expense
Ensure the system messages says "set the description", rather than "set the comment"
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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