Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support multilingual menu display using i18next (supports Chinese and English) #991

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

feifei325
Copy link

@feifei325 feifei325 commented Feb 14, 2025

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Roo Code settings menu supports multiple languages

  • en(English)
  • zh(Simplified Chinese)

Related Issues

Reviewers


Important

Adds multilingual support using i18next, with English and Chinese translations, and updates components to utilize translation keys.

  • Multilingual Support:
    • Integrates i18next and react-i18next for multilingual support in index.tsx.
    • Adds English (en.json) and Chinese (zh.json) translations in webview-ui/src/i18n/locales/.
    • Configures language detection and fallback in i18n/index.ts.
  • Component Updates:
    • Updates components like SettingsView.tsx, PromptsView.tsx, McpView.tsx, and others to use useTranslation for text.
    • Replaces hardcoded strings with translation keys in components such as HistoryView.tsx, McpToolRow.tsx, and ApiConfigManager.tsx.
  • Dependencies:
    • Adds i18next and react-i18next to package.json dependencies.
  • Miscellaneous:
    • Updates package.json to bump typescript version.

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

Copy link

changeset-bot bot commented Feb 14, 2025

⚠️ No Changeset found

Latest commit: fd08886

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

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I’ll take a look at this soon. In general I haven’t thought a ton about the internationalization strategy - curious what people have seen work in the past. Just using internationalized strings when developing and letting the community translate as follow-ups?

@feifei325
Copy link
Author

Thanks for the PR! I’ll take a look at this soon. In general I haven’t thought a ton about the internationalization strategy - curious what people have seen work in the past. Just using internationalized strings when developing and letting the community translate as follow-ups?

Thanks for the response! I’m currently promoting the Roo Code plugin to my colleagues, and in order to help everyone better understand the meaning of the menu settings, I’ve implemented internationalization. I personally believe that using internationalized strings during development helps developers from different countries better understand the meaning of the menu settings.

@im47cn
Copy link

im47cn commented Feb 24, 2025

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.

3 participants