-
Notifications
You must be signed in to change notification settings - Fork 181
feat: add i18n support to OpenAgents Studio #183
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
Conversation
- 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>
|
@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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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>
…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>
|
LGTM. Merged |
What This Pull Request Does
Added internationalization support to OpenAgents Studio, achieving complete multilingual functionality.
Major Changes
Core i18n Infrastructure
Language Switch Component
Comprehensive UI Translation Coverage
Layout components: sidebar, navigation tabs, default sidebar contentAuthentication process: network selection, proxy settings, login pageMessaging: chat interface, message input, notification permissionsDocumentation: document list, create modalWiki: page list, create modal, proposal managementForum: topic list, create modal, comment functionDynamic features: dynamic publication, list displayArtifactmoduleLLMLogsmoduleServiceAgentsmoduleProjectmoduleEventsmoduleAgentWorldmoduleTranslation File Structure
common,auth,layout,messaging,documents,wiki,forum,feed)Key Improvements