Skip to content

feat(wren-ui): Support Dutch(NL) language#1867

Merged
andreashimin merged 1 commit intomainfrom
feat/support-dutch
Aug 6, 2025
Merged

feat(wren-ui): Support Dutch(NL) language#1867
andreashimin merged 1 commit intomainfrom
feat/support-dutch

Conversation

@andreashimin
Copy link
Copy Markdown
Contributor

@andreashimin andreashimin commented Aug 5, 2025

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

  • New Features
    • Added support for Dutch (NL) as a project language option throughout the application.
    • Reordered language options to improve language selection experience, including moving Arabic (AR) to the front of the list.

@andreashimin andreashimin requested a review from fredalai August 5, 2025 08:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 5, 2025

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 005cf10 and 39f6a3b.

📒 Files selected for processing (4)
  • wren-ui/src/apollo/client/graphql/__types__.ts (2 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)

Walkthrough

This change adds support for the Dutch language across the codebase. It introduces the NL code to the ProjectLanguage and WrenAILanguage enums, updates the GraphQL schema to include Dutch, and maps the new language code to its display name, "Dutch," in the language utility. Additionally, the position of the Arabic (AR) language code was moved to the start of the ProjectLanguage enum.

Changes

Cohort / File(s) Change Summary
ProjectLanguage Enum Update
wren-ui/src/apollo/client/graphql/__types__.ts, wren-ui/src/apollo/server/schema.ts
Added NL (Dutch) to the ProjectLanguage enum and GraphQL schema; moved AR to the beginning of the enum.
WrenAILanguage Enum Update
wren-ui/src/apollo/server/models/adaptor.ts
Added NL = 'Dutch' to the WrenAILanguage enum.
Language Mapping Update
wren-ui/src/utils/language.ts
Mapped ProjectLanguage.NL to 'Dutch' in the language display name utility.

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")
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

A sprinkle of Dutch in the code we see,
Enum and mapping, as neat as can be.
Now "NL" joins the language parade,
In schema and utils, its mark is made.
Hoppity-hop, with each new tongue,
More users to greet—our work is well done! 🐇🌷

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/support-dutch

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between d97f55f and b7b4429.

📒 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.ts
  • wren-ui/src/utils/language.ts
  • wren-ui/src/apollo/server/schema.ts
  • wren-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.ts
  • wren-ui/src/utils/language.ts
  • wren-ui/src/apollo/server/schema.ts
  • wren-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.ts
  • wren-ui/src/apollo/server/schema.ts
  • wren-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 new NL language code.

The enum extension itself looks correct, but this value propagates to:

  • Prisma records (if ProjectLanguage is persisted)
  • The UpdateCurrentProjectInput/Settings resolvers
  • Any switch/lookup tables that map ProjectLanguage → WrenAILanguage

Please 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_sql API without strict WrenAILanguage validation. Adding NL is great, but please ensure:

  1. No new runtime check was introduced elsewhere that now requires configurations.language to fall inside this enum.
  2. 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 NL member was correctly propagated by codegen. Nothing further to review here.

@andreashimin andreashimin merged commit 40506b8 into main Aug 6, 2025
10 checks passed
@andreashimin andreashimin deleted the feat/support-dutch branch August 6, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants