-
-
Notifications
You must be signed in to change notification settings - Fork 375
Fix nested key linked message #2237
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
base: master
Are you sure you want to change the base?
Fix nested key linked message #2237
Conversation
WalkthroughA new translation scenario involving linked nested keys was introduced across the codebase. Translation files and HTML templates were updated to add and demonstrate the new linked key. The translation core logic was adjusted to refine fallback resolution. Corresponding tests, including end-to-end and unit tests, were added or extended to cover these changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant Translator
participant Messages
User->>App: Request translation for 'message.linkedWithNested'
App->>Translator: translate('message.linkedWithNested')
Translator->>Messages: Lookup 'message.linkedWithNested'
Messages-->>Translator: "@:nested.key"
Translator->>Messages: Lookup 'nested.key'
Messages-->>Translator: "Nested key"
Translator-->>App: "Nested key"
App-->>User: Display "Nested key"
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code Graph Analysis (2)e2e/formatting/linked.spec.ts (1)
packages/core-base/test/translate.test.ts (1)
🔇 Additional comments (10)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
Problem description
When using a flat JSON for translation messages, linked messages are not resolved.
For example:
The following does not return anything:
t('message.linkedWithNested')
Summary by CodeRabbit
New Features
Bug Fixes
Tests