fix: update localization keys for common, risk, and settings - #171
Conversation
- Added new localization keys for frequency options (monthly, quarterly, yearly) in common. - Introduced new keys for risk department and its placeholder in the risk feature. - Added a delete confirmation message in settings and a new home navigation message in the error handling section.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
WalkthroughThis pull request updates localization files by adding new keys to existing objects. In the common localization file, several new status values ( Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 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 (
|
- Added new localization keys for onboarding, common statuses, and risk descriptions to improve clarity and consistency. - Introduced keys for excluded translation checks to streamline unused key detection. - Updated existing keys in the risk and settings modules to enhance user experience and provide better context.
- Added new translation keys for relevant and not-relevant statuses in the policies localization. - Implemented a mapping function for status translations to improve clarity in the StatusPolicies component. - Updated the unused key detection logic to support wildcard patterns for better flexibility in excluding keys.
- Added 'common.status.*' to the list of excluded keys for unused localization checks. - Enhanced flexibility in detecting unused translation keys by supporting wildcard patterns.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/app/src/locales/analyze-locale-usage.ts (1)
128-141: Good implementation of wildcard pattern matching!The implementation correctly handles the exclusion of keys using wildcard patterns ending with
*. This is a clean approach that makes the tool more flexible when analyzing localization usage.Consider adding a brief comment explaining what types of keys these specific patterns (
common.frequency.*andcommon.status.*) represent, which would help with future maintenance.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/app/src/locales/analyze-locale-usage.ts(2 hunks)
🔇 Additional comments (1)
apps/app/src/locales/analyze-locale-usage.ts (1)
19-24: Well-implemented exclusion mechanism for localization keys!This is a good addition that allows certain translation key patterns to be excluded from the unused key check. The exclusion is particularly useful for dynamic keys or those that might be used programmatically in ways that static analysis can't detect.
- Changed the export type of translations from DeepReadonly to Readonly for improved type consistency across the application.
- Changed the export of translations from a constant to a named export for improved modularity and consistency in localization handling.
Summary by CodeRabbit