feat(wren-ui): Support Dutch(NL) language#1867
Conversation
|
Warning Rate limit exceeded@andreashimin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 13 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughThis change adds support for the Dutch language across the codebase. It introduces the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant GraphQL Server
participant Language Utils
Client->>GraphQL Server: Query/Mutation with ProjectLanguage.NL
GraphQL Server->>Language Utils: Resolve display name for NL
Language Utils-->>GraphQL Server: Return "Dutch"
GraphQL Server-->>Client: Respond with language info (NL/"Dutch")
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ 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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
wren-ui/src/utils/language.ts (1)
14-17: Display text: consider endonym or bilingual form.All existing entries use the English exonym (“German”, “Spanish”, …). “Dutch” keeps that pattern, which is fine, but if the UI ever switches to endonyms (“Deutsch”, “Español”, …) you may prefer “Nederlands” or “Dutch (Nederlands)” for consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
wren-ui/src/apollo/client/graphql/__types__.ts(1 hunks)wren-ui/src/apollo/server/models/adaptor.ts(1 hunks)wren-ui/src/apollo/server/schema.ts(1 hunks)wren-ui/src/utils/language.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: wwwy3y3
PR: Canner/WrenAI#1585
File: wren-ui/src/pages/api/v1/generate_sql.ts:98-106
Timestamp: 2025-04-24T16:10:43.308Z
Learning: In the generate_sql API, allow users to specify language codes not predefined in the WrenAILanguage enum, passing them through directly rather than strictly validating against the enum.
📚 Learning: the typo in error code enum names ("identied_as_general" and "identied_as_misleading_query" instead ...
Learnt from: andreashimin
PR: Canner/WrenAI#1414
File: wren-ui/src/apollo/server/utils/error.ts:0-0
Timestamp: 2025-03-18T10:28:10.593Z
Learning: The typo in error code enum names ("IDENTIED_AS_GENERAL" and "IDENTIED_AS_MISLEADING_QUERY" instead of "IDENTIFIED_AS_GENERAL" and "IDENTIFIED_AS_MISLEADING_QUERY") in wren-ui/src/apollo/server/utils/error.ts was recognized but intentionally not fixed as it was considered out of scope for PR #1414.
Applied to files:
wren-ui/src/apollo/server/models/adaptor.tswren-ui/src/utils/language.tswren-ui/src/apollo/server/schema.tswren-ui/src/apollo/client/graphql/__types__.ts
📚 Learning: in the generate_sql api, allow users to specify language codes not predefined in the wrenailanguage ...
Learnt from: wwwy3y3
PR: Canner/WrenAI#1585
File: wren-ui/src/pages/api/v1/generate_sql.ts:98-106
Timestamp: 2025-04-24T16:10:43.308Z
Learning: In the generate_sql API, allow users to specify language codes not predefined in the WrenAILanguage enum, passing them through directly rather than strictly validating against the enum.
Applied to files:
wren-ui/src/apollo/server/models/adaptor.tswren-ui/src/utils/language.tswren-ui/src/apollo/server/schema.tswren-ui/src/apollo/client/graphql/__types__.ts
📚 Learning: the enum names `identied_as_general` and `identied_as_misleading_query` in generalerrorcodes enum in...
Learnt from: andreashimin
PR: Canner/WrenAI#1414
File: wren-ui/src/apollo/server/utils/error.ts:0-0
Timestamp: 2025-03-18T10:28:26.608Z
Learning: The enum names `IDENTIED_AS_GENERAL` and `IDENTIED_AS_MISLEADING_QUERY` in GeneralErrorCodes enum in wren-ui/src/apollo/server/utils/error.ts have typos (missing "FI" in "IDENTIFIED") but fixing them is not in scope for the current PR.
Applied to files:
wren-ui/src/apollo/server/models/adaptor.tswren-ui/src/apollo/server/schema.tswren-ui/src/apollo/client/graphql/__types__.ts
📚 Learning: in the wren-ai-service codebase, when adding new fields like "alias" to the output of functions that...
Learnt from: cyyeh
PR: Canner/WrenAI#1763
File: wren-ai-service/src/pipelines/generation/semantics_description.py:31-33
Timestamp: 2025-06-20T02:37:21.292Z
Learning: In the wren-ai-service codebase, when adding new fields like "alias" to the output of functions that use Pydantic models for validation, the user prefers not to update the corresponding Pydantic model definitions to include these new fields.
Applied to files:
wren-ui/src/apollo/server/models/adaptor.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
wren-ui/src/apollo/server/schema.ts (1)
119-132: Verify downstream handling of the newNLlanguage code.The enum extension itself looks correct, but this value propagates to:
- Prisma records (if
ProjectLanguageis persisted)- The
UpdateCurrentProjectInput/Settingsresolvers- Any switch/lookup tables that map
ProjectLanguage → WrenAILanguagePlease double-check that these paths gracefully accept the new enum value and that no validation logic rejects it as “unknown”.
wren-ui/src/apollo/server/models/adaptor.ts (1)
32-45: Confirm enum remains non-blocking for user-supplied language strings.Earlier guidance (PR #1585) intentionally allowed arbitrary language codes to flow through the
generate_sqlAPI without strictWrenAILanguagevalidation. AddingNLis great, but please ensure:
- No new runtime check was introduced elsewhere that now requires
configurations.languageto fall inside this enum.- The generic pass-through behaviour for unknown codes still works (otherwise future languages will break again).
A quick grep for
WrenAILanguage[or.includes(around validation logic should suffice.wren-ui/src/apollo/client/graphql/__types__.ts (1)
1116-1125: Generated file – no manual changes required.The added
NLmember was correctly propagated by codegen. Nothing further to review here.
b7b4429 to
005cf10
Compare
005cf10 to
39f6a3b
Compare
Description
This PR adds support for the Dutch language to the Wren AI project. It includes language configuration updates and any necessary localization to enable Dutch as an available option in the interface and query processing.
Changes
Added Dutch language support in language settings
Summary by CodeRabbit