[Hold Web-E#52674] Implement policy changelog report action system messages for: Changing the default tax rate for a category#89840
Conversation
- Introduced new constant for category tax rate updates reprt action in CONST. - Added English copy for updated category tax rate. - Implemented message retrieval for category tax rate changes in ReportActionsUtils. - Updated OriginalMessage type to include new tax rate details fields for categories.
…handle category default tax rate updates report action.
…onsListUtils, ReportNameUtils, and SidebarUtils. Ensure correct rendering of the message.
|
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 ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
…arameter structure in translation functions
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@DylanDylann 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: 87aed17ec3
ℹ️ 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".
| const oldTax = oldTaxPercentage ? `${oldTaxName} (${oldTaxPercentage})` : (oldTaxName ?? ''); | ||
| const newTax = newTaxPercentage ? `${newTaxName} (${newTaxPercentage})` : newTaxName; | ||
|
|
||
| return translate('workspaceActions.updatedCategoryTaxRate', { |
There was a problem hiding this comment.
Add the new translation key to every locale
When the app locale is anything other than English or Spanish, this new changelog renderer calls translate('workspaceActions.updatedCategoryTaxRate', ...), but updatedCategoryTaxRate is only present in en.ts and es.ts (I checked de, fr, it, ja, nl, pl, pt-BR, and zh-hans). Localize.translate returns/logs a missing translation in production/staging and throws in development, so users on those locales will see the key/missing marker or crash when viewing/copying this system message.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@MariaHCD - could you please run the translations GH action https://github.com/Expensify/App/actions/workflows/generateTranslations.yml? Thanks!
Explanation of Change
This PR adds support for NewDot to render the new
POLICYCHANGELOG_UPDATE_CATEGORY_TAX_RATEpolicy changelog report action, which fires when an admin changes a category's default tax rate on a workspace.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/634128
PROPOSAL:
Tests
Categoriesscreen in your workspaceCategory rules, click onDefault tax ratechanged the "${categoryName}" category default tax rate to "${newTaxName} (${newTaxPercentage})" (previously "${oldTaxName} (${oldTaxPercentage})")changed the "Advertising" category default tax rate to "Tax Rate 1 (5%)" (previously "Tax exempt (0%)")Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
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
recording.mov