Feat(wren-ui): Add Persian (fa_IR) language support to project#1732
Feat(wren-ui): Add Persian (fa_IR) language support to project#1732andreashimin merged 5 commits intoCanner:mainfrom
Conversation
## Walkthrough
The changes add support for the Persian language by introducing the `FA_IR` language code and its corresponding label `'Persian'` to the language-related enums and mappings in the codebase. The updates affect the enum definitions and a utility function for language display names.
## Changes
| File(s) | Change Summary |
|----------------------------------------------------------------|--------------------------------------------------------------------|
| **Server Language Enums**<br>`wren-ui/src/apollo/server/models/adaptor.ts` | Added `FA_IR = 'Persian'` to the `WrenAILanguage` enum |
| **Server GraphQL Schema**<br>`wren-ui/src/apollo/server/schema.ts` | Added `FA_IR` to the `ProjectLanguage` enum |
| **Client GraphQL Types**<br>`wren-ui/src/apollo/client/graphql/__types__.ts` | Added `FA_IR = 'FA_IR'` to the `ProjectLanguage` enum |
| **Language Utility**<br>`wren-ui/src/utils/language.ts` | Added mapping for `fa_IR` to `'Persian'` in `getLanguageText` |
## Suggested reviewers
- wwwy3y3
## Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
## Possibly related PRs
- Canner/WrenAI#1788: Adds the Arabic language (`AR`) to the same enums and language mappings, related by extending language support in similar code areas.
## Poem
> A hop and a skip, a new tongue appears,
> Persian now joins—let's give three cheers!
> From enums to mappings, the code's grown anew,
> "FA_IR" is ready for all to view.
> 🐇✨
> Languages flourish, the garden expands,
> With every new entry, the project withstands!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 (4)
🚧 Files skipped from review as they are similar to previous changes (4)
✨ 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: 1
🧹 Nitpick comments (2)
wren-ui/src/apollo/server/schema.ts (1)
110-110: Maintain uppercase enum naming
GraphQL enum values are uppercase; changefa_IRtoFA_IRfor consistency.- fa_IR + FA_IRwren-ui/src/apollo/server/models/adaptor.ts (1)
43-43: Align enum key with convention
Rename the new enum member toFA_IRto match the uppercase style of otherWrenAILanguageentries.- fa_IR = 'Persian', + FA_IR = 'Persian',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
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)
andreashimin
left a comment
There was a problem hiding this comment.
lgtm. Thanks for your contribution!
Description:
This pull request adds support for the Persian language (
fa_IR) across thewren-uiproject. The following updates have been made:Changes:
wren-ui/src/apollo/server/models/adaptor.tsfa_IR = 'Persian'to theWrenAILanguageenum.wren-ui/src/apollo/server/schema.tsfa_IRto the GraphQLProjectLanguageenum in thetypeDefs.wren-ui/src/utils/language.tsfa_IRto'Persian'in thegetLanguageTextfunction.Purpose:
This update enables Persian language support throughout the project, paving the way for Persian-speaking users to interact with the application in their native language. It aligns with the goal of improving internationalization and localization capabilities.
Summary by CodeRabbit