Skip to content

Conversation

@ihsanvalizade
Copy link
Contributor

@ihsanvalizade ihsanvalizade commented Nov 3, 2025

This commit adds Turkish (TR) language support across the wren-ui project.

Changes include:

  • Added TR = 'TR' to ProjectLanguage enum in types.ts
  • Added TR = 'Turkish' to WrenAILanguage enum in adaptor.ts
  • Added TR to GraphQL ProjectLanguage enum in schema.ts
  • Mapped ProjectLanguage.TR to 'Turkish' in getLanguageText (language.ts)

Summary by CodeRabbit

Release Notes

  • New Features
    • Turkish language support is now available as a selectable language option in the application.

This commit adds Turkish (TR) language support across the wren-ui project.

Changes include:
- Added TR = 'TR' to ProjectLanguage enum in __types__.ts
- Added TR = 'Turkish' to WrenAILanguage enum in adaptor.ts
- Added TR to GraphQL ProjectLanguage enum in schema.ts
- Mapped ProjectLanguage.TR to 'Turkish' in getLanguageText (language.ts)
Copilot AI review requested due to automatic review settings November 3, 2025 20:53
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

Walkthrough

The PR adds Turkish language support to the WrenAI application by introducing the language code TR across multiple language-related enums (ProjectLanguage, WrenAILanguage) and adding a corresponding language mapping in the language utilities module.

Changes

Cohort / File(s) Summary
GraphQL Types and Schema
wren-ui/src/apollo/client/graphql/__types__.ts, wren-ui/src/apollo/server/schema.ts
Added TR = 'TR' enum value to ProjectLanguage enum; schema also adds trailing comma after NL value
Server Models
wren-ui/src/apollo/server/models/adaptor.ts
Added TR = 'Turkish' enum value to WrenAILanguage enum
Language Utilities
wren-ui/src/utils/language.ts
Added mapping entry [ProjectLanguage.TR]: 'Turkish' to getLanguageText object

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Changes follow a consistent, homogeneous pattern across all files (same language addition pattern as prior language PRs)
  • Each file modification is straightforward with minimal logic density
  • No control-flow or structural changes; purely additive enum and mapping entries

Possibly related PRs

Suggested labels

wren-ui

Suggested reviewers

  • andreashimin
  • fredalai

Poem

🐰 A rabbit hops with Turkish delight,
TR now shines in enums bright!
From schema to utils, the mappings align,
Another language joins the line. ✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding Turkish language support to the wren-ui project, which is reflected across all modified files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d07162 and e777e49.

📒 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 (3)
📓 Common learnings
Learnt from: wwwy3y3
Repo: Canner/WrenAI PR: 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: 2025-03-18T10:28:10.593Z
Learnt from: andreashimin
Repo: Canner/WrenAI PR: 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/client/graphql/__types__.ts
  • wren-ui/src/apollo/server/models/adaptor.ts
  • wren-ui/src/apollo/server/schema.ts
📚 Learning: 2025-03-18T10:28:26.608Z
Learnt from: andreashimin
Repo: Canner/WrenAI PR: 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/client/graphql/__types__.ts
  • wren-ui/src/apollo/server/schema.ts
🔇 Additional comments (4)
wren-ui/src/apollo/client/graphql/__types__.ts (1)

1130-1130: LGTM! Turkish language code added correctly.

The addition of TR = 'TR' to the ProjectLanguage enum follows the established pattern and is consistent with other language codes.

wren-ui/src/apollo/server/models/adaptor.ts (1)

47-47: LGTM! Turkish language mapping added correctly.

The addition of TR = 'Turkish' to the WrenAILanguage enum is consistent with the existing pattern and properly maps the language code to its English name.

wren-ui/src/utils/language.ts (1)

19-19: LGTM! Language text mapping added correctly.

The addition of [ProjectLanguage.TR]: 'Turkish' properly extends the language mapping and is consistent with the value used in the WrenAILanguage enum.

wren-ui/src/apollo/server/schema.ts (1)

133-134: LGTM! GraphQL enum updated correctly.

The addition of TR to the ProjectLanguage enum is correct. The trailing comma added after NL (line 133) is good practice as it makes future additions cleaner and reduces diff noise.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Turkish language support to the Wren UI application by introducing the TR language code across the codebase.

Key changes:

  • Added Turkish (TR) as a supported language option in the GraphQL schema and type definitions
  • Added Turkish language text mapping in the language utility function
  • Added Turkish language constant in the WrenAI adaptor model

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
wren-ui/src/utils/language.ts Added Turkish language text mapping
wren-ui/src/apollo/server/schema.ts Added TR to ProjectLanguage enum in GraphQL schema
wren-ui/src/apollo/server/models/adaptor.ts Added Turkish to WrenAILanguage enum
wren-ui/src/apollo/client/graphql/types.ts Added TR to ProjectLanguage enum in client type definitions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@fredalai fredalai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fredalai fredalai merged commit 0dfb3c6 into Canner:main Nov 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants