Skip to content

Conversation

@feifei325
Copy link
Contributor

@feifei325 feifei325 commented Mar 10, 2025

Context

To maintain a clean code environment, I created a new PR. The PR being discussed is this one. This PR only integrates the i18n framework and translates the welcome message as an example.

Implementation

By calling the NavigatorLanguage interface MDN Reference , retrieve the user's current system locale and translate the settings menu into different languages based on the locale.

If the current system language is not configured with the corresponding language file, English will be displayed by default.

Screenshots

The screenshot example is for a Chinese language environment.

before after
image image

How to Test

Get in Touch


Important

Integrates i18n framework using react-i18next to translate the welcome message in WelcomeView.tsx based on user's browser language.

  • Internationalization:
    • Integrates react-i18next and i18next in webview-ui/src/i18n/index.ts for language support.
    • Detects user's browser language and sets default language to Chinese or English.
    • Adds translation files en.json and zh-CN.json for English and Chinese.
  • Components:
    • Translates welcome message in WelcomeView.tsx using Trans component from react-i18next.
  • Dependencies:
    • Adds react-i18next and i18next to package.json and webview-ui/package.json.

This description was created by Ellipsis for 5348287. It will automatically update as commits are pushed.

@feifei325 feifei325 requested review from cte and mrubens as code owners March 10, 2025 14:54
@changeset-bot
Copy link

changeset-bot bot commented Mar 10, 2025

⚠️ No Changeset found

Latest commit: 5348287

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 10, 2025
@dosubot dosubot bot added the enhancement New feature or request label Mar 10, 2025
@mrubens
Copy link
Collaborator

mrubens commented Mar 10, 2025

Thank you @feifei325, this is a great place to start! I have a branch that I'm working on as well. Let me take a look at how it compares to what you have and I'll get back to you.

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Mar 10, 2025
@mrubens mrubens mentioned this pull request Mar 12, 2025
@mrubens
Copy link
Collaborator

mrubens commented Mar 12, 2025

Merged #1584 based on this, thank you!

@mrubens mrubens closed this Mar 12, 2025
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Mar 12, 2025
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
…ompt (RooCodeInc#1538)

* feat: set preferred language in settings and have it update system prompt

* Update webview-ui/src/components/settings/PreferredLanguagePicker.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* remove unnecessary useEffect

* tweak prompt

* formatting from main

* Update Cline.ts

* Revert "Update Cline.ts"

This reverts commit bee6f0fee0b0783293aa035e566978589fe837d6.

* Fixes

* Update Cline.ts

* move preferredLanguage to Advanced Settings

* remove unneccessary import

* remove more imports

* skip language prompt for default language `en`

* Update package.json

* lint

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants