-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation: desktop-client/components/payees/ManagePayees #3623
Translation: desktop-client/components/payees/ManagePayees #3623
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller
Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
…into translate-managepayees
I'm not sure why the compare check failed, but everything else should be in order. |
WalkthroughThe pull request introduces internationalization features to the Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
packages/desktop-client/src/components/payees/ManagePayees.tsx (3)
193-196
: LGTM with a minor suggestion: Good use of translation functionThe translation function
t
is correctly used for both the "No payees selected" case and the plural form of "payee"/"payees". This approach will work well for internationalization.However, for even better i18n support, consider using a single translation key that includes both the number and the noun. This allows for more flexibility in languages with complex plural rules.
Consider refactoring to use a single translation key:
t('{{count}} payee selected', { count: selected.items.size })This approach allows the translation file to handle pluralization and word order differences across languages more effectively.
229-236
: Improvement needed: Refactor for better i18n supportWhile the
t
function is correctly used for translations, the current implementation can be improved for better internationalization support.Consider the following improvements:
- Use a single translation key with pluralization for the "Show X unused payee(s)" text:
t('Show {{count}} unused payee', { count: orphanedPayees.length })
- Move the ternary operator outside of the
t
function call:orphanedOnly ? t('Show all payees') : t('Show {{count}} unused payee', { count: orphanedPayees.length })These changes will allow for more flexible translations across different languages, especially those with complex plural rules.
Line range hint
270-270
: Suggestion: Translate "No payees" textFor consistency, the "No payees" text in the empty state should also be translated.
Replace:
No payeeswith:
{t('No payees')}This will ensure that all user-facing strings in the component are translatable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
upcoming-release-notes/3623.md
is excluded by!**/*.md
📒 Files selected for processing (1)
- packages/desktop-client/src/components/payees/ManagePayees.tsx (4 hunks)
🧰 Additional context used
🔇 Additional comments (3)
packages/desktop-client/src/components/payees/ManagePayees.tsx (3)
8-8
: LGTM: Correct import of useTranslation hookThe import of
useTranslation
from 'react-i18next' is correctly added, which is essential for implementing internationalization in this component.
96-96
: LGTM: Proper usage of useTranslation hookThe
useTranslation
hook is correctly used to obtain thet
function, which will be used for translating strings throughout the component.
242-242
: LGTM: Correct translation of placeholder textThe placeholder text for the search input is correctly translated using the
t
function. This is a good practice for ensuring all user-facing strings are translatable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks
Add translation support for
packages/desktop-client/src/components/payees/ManagePayees.tsx
.