Skip to content

Conversation

@normal-coder
Copy link
Contributor

@normal-coder normal-coder commented Dec 10, 2025

What This Pull Request Does

Added internationalization support to OpenAgents Studio, achieving complete multilingual functionality.

Major Changes

Core i18n Infrastructure

  • Integrated i18next, react-i18next, and language detection
  • Configured English and Chinese translation resources (en/zh-CN)

Language Switch Component

  • Implemented LanguageSwitcher component, supporting flag display
  • Added configurable style variants, alignment, and sizes
  • Integrated language switcher into the sidebar and authentication page

Comprehensive UI Translation Coverage

  • Layout components: sidebar, navigation tabs, default sidebar content
  • Authentication process: network selection, proxy settings, login page
  • Messaging: chat interface, message input, notification permissions
  • Documentation: document list, create modal
  • Wiki: page list, create modal, proposal management
  • Forum: topic list, create modal, comment function
  • Dynamic features: dynamic publication, list display
  • Artifact module
  • LLMLogs module
  • ServiceAgents module
  • Project module
  • Events module
  • AgentWorld module

Translation File Structure

  • Modular translation files (common, auth, layout, messaging, documents, wiki, forum, feed)
  • Includes error messages, status information, action buttons, and empty state prompts

Key Improvements

  • Implemented dynamic translation in components through the useTranslation hook
  • Replaced all hard-coded strings with translatable content
  • Added support for parameterized translation (such as usernames, counts, etc.)

- Add `i18next`, `react-i18next` and language detector dependencies
- Implement `LanguageSwitcher` component with dropdown UI
- Integrate `LanguageSwitcher` into sidebar footer
- Add translation files for English and Chinese (common, auth, network, errors, validation)
- Configure webpack to ignore Monaco Editor source map warnings
- Update TypeScript to v5 and fix lint glob pattern
- Add i18n utilities for language detection and formatting

Signed-off-by: 诺墨 <normal@normalcoder.com>
- Simplify language display to show only flag without text
- Adjust dropdown positioning to center under button

Signed-off-by: 诺墨 <normal@normalcoder.com>
… components

Signed-off-by: 诺墨 <normal@normalcoder.com>
- Add variant, align and size props to LanguageSwitcher component
- Implement translation for local and manual network connection UI
- Add auth namespace translations for network selection, agent setup and connection flow
- Integrate LanguageSwitcher in network selection and agent setup pages
- Add translation support for manual connection tabs and inputs

Signed-off-by: 诺墨 <normal@normalcoder.com>
- Add translation for all UI elements in agent setup page
- Replace hardcoded strings with translated content from auth namespace
- Add translation for error messages and form elements
- Update password requirement and connection status messages
- Move language switcher to bottom right of agent setup form

Signed-off-by: 诺墨 <normal@normalcoder.com>
…ing components

Signed-off-by: 诺墨 <normal@normalcoder.com>
…nt components

Signed-off-by: 诺墨 <normal@normalcoder.com>
…ents

Signed-off-by: 诺墨 <normal@normalcoder.com>
…tor to work

Signed-off-by: 诺墨 <normal@normalcoder.com>
…elated components

Signed-off-by: 诺墨 <normal@normalcoder.com>
@vercel
Copy link

vercel bot commented Dec 10, 2025

@normal-coder is attempting to deploy a commit to the Raphael's projects Team on Vercel.

A member of the Team first needs to authorize it.

@zomux zomux requested a review from lihongmeng December 11, 2025 01:43
@zomux zomux marked this pull request as ready for review December 11, 2025 01:44
Copilot AI review requested due to automatic review settings December 11, 2025 01:44
@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
openagents-studio Ready Ready Preview, Comment Dec 14, 2025 7:27am

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 comprehensive internationalization (i18n) support to OpenAgents Studio with English and Chinese (zh-CN) translations. The implementation uses i18next and react-i18next libraries with browser language detection.

Key Changes:

  • Integrated i18next, react-i18next, and i18next-browser-languagedetector packages
  • Created modular translation files for 11 namespaces (common, auth, layout, messaging, documents, wiki, forum, feed, network, errors, validation)
  • Implemented LanguageSwitcher component with configurable styles
  • Updated all major UI components to use translation hooks

Reviewed changes

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

Show a summary per file
File Description
studio/package.json Added i18n dependencies and upgraded TypeScript to 5.0.0
studio/yarn.lock Dependency lock file updates for new packages
studio/craco.config.js Added Monaco Editor source map warning suppression
studio/src/index.tsx Initialized i18n configuration
studio/src/i18n/* i18n configuration, utilities, types, and translation files
studio/src/hooks/useI18n.ts Custom hook for i18n with language switching utilities
studio/src/components/common/LanguageSwitcher.tsx Dropdown language selector component
studio/src/components/layout/* Updated Sidebar, ModSidebar, and other layout components with translations
studio/src/components/network/* Updated LocalNetwork and ManualNetwork with translations
studio/src/components/documents/* Updated DocumentList and CreateDocumentModal with translations
studio/src/components/wiki/* Updated WikiPageList and WikiCreateModal with translations
studio/src/components/forum/* Updated ForumTopicList and ForumCreateModal with translations
studio/src/components/feed/* Updated FeedCreateModal with translations
studio/src/pages/messaging/* Updated MessagingView, MessageInput, NotificationPermissionOverlay with translations
studio/src/pages/NetworkSelectionPage.tsx Updated with translations
studio/src/pages/AgentSetupPage.tsx Updated with translations and added LanguageSwitcher

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

…ult language

Signed-off-by: 诺墨 <normal@normalcoder.com>
Signed-off-by: 诺墨 <normal@normalcoder.com>
…components

Signed-off-by: 诺墨 <normal@normalcoder.com>
Signed-off-by: 诺墨 <normal@normalcoder.com>
Signed-off-by: 诺墨 <normal@normalcoder.com>
…sidebar

Signed-off-by: 诺墨 <normal@normalcoder.com>
…t components

Signed-off-by: 诺墨 <normal@normalcoder.com>
Signed-off-by: 诺墨 <normal@normalcoder.com>
…vent components

Signed-off-by: 诺墨 <normal@normalcoder.com>
…onent

Signed-off-by: 诺墨 <normal@normalcoder.com>
…s view

Signed-off-by: 诺墨 <normal@normalcoder.com>
…ervice agents components

Signed-off-by: 诺墨 <normal@normalcoder.com>
normal-coder and others added 7 commits December 12, 2025 00:52
…lations

- Add translations for project template dialog UI elements, messages and actions
- Add translations for project chat room UI elements, messages and status indicators
- Integrate useTranslation hook in ProjectTemplateDialog and ProjectChatRoom components
- Update i18n configuration to include artifact, llmlogs, serviceAgent, events and agentWorld namespaces
- Add translations for artifact sidebar content

Signed-off-by: 诺墨 <normal@normalcoder.com>
…tive editor and auth hook

- Remove unused EditOperation and CursorPosition interfaces from MonacoCollaborativeEditor
- Remove unused version state and currentSelection variable from MonacoCollaborativeEditor
- Move cleanup useEffect to be before sync check implementation in MonacoCollaborativeEditor
- Remove unused AuthProvider import from useAuth hook
- Add missing dependency t to AgentManagement useEffect hook
- Update react-app-env.d.ts type definitions for better compatibility
- Remove unused NetworkConnection import from types/index.ts
- Remove unused ChatResponse interface from api.ts
- Fix code formatting and minor cleanup in api.ts

Signed-off-by: 诺墨 <normal@normalcoder.com>
…ents

- Remove unused toast dependency from McpRouterView useEffect
- Remove unused ServerIcon import from McpServerView
- Remove unused useNavigate from McpMainPage
- Format code for better readability in McpRouterView

Signed-off-by: 诺墨 <normal@normalcoder.com>
Signed-off-by: 诺墨 <normal@normalcoder.com>
Signed-off-by: 诺墨 <normal@normalcoder.com>
- Integrate useTranslation hook in FeedCreateModal, FeedPostDetail, FeedView and FeedSidebar components
- Replace hardcoded UI strings with localized translations from feed namespace
- Add comprehensive translation files for English and Chinese feed UI elements
- Update category options to use translated labels instead of hardcoded values

Signed-off-by: 诺墨 <normal@normalcoder.com>
- Introduced a new configuration file for i18n with supported languages (English and Chinese).
- Defined constants for language storage, fallback language, and application namespaces.
- Added types for supported languages and namespaces to enhance type safety.

Co-authored-by: 诺墨 <normal@normalcoder.com>
- Introduced Japanese and Korean language support, expanding the i18n configuration.
- Updated README to reflect the new language capabilities and auto-detection feature.
- Added comprehensive translation files for Japanese and Korean across various UI components.

Co-authored-by: 诺墨 <normal@normalcoder.com>
@zomux zomux merged commit 1b423f9 into openagents-org:develop Dec 14, 2025
0 of 5 checks passed
@zomux
Copy link
Contributor

zomux commented Dec 14, 2025

LGTM. Merged

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