Skip to content

feat(ui): add i18n support with English and Chinese translations#3218

Open
m7rick wants to merge 7 commits intomaximhq:mainfrom
m7rick:feat/add-i18n-support
Open

feat(ui): add i18n support with English and Chinese translations#3218
m7rick wants to merge 7 commits intomaximhq:mainfrom
m7rick:feat/add-i18n-support

Conversation

@m7rick
Copy link
Copy Markdown

@m7rick m7rick commented May 5, 2026

  • Add react-i18next with language switcher component
  • Add English (en) and Chinese (zh) locale files
  • Translate sidebar, all workspace pages, enterprise fallback views
  • Set English as default language
  • Add language switcher to sidebar footer

Summary

Add comprehensive internationalization (i18n) support to the Bifrost UI, enabling multi-language translations and making it easy for the community to contribute additional languages. Initial support includes English (en) and Chinese (zh).

Changes

  • Integrate react-i18next with i18next-browser-languagedetector for UI internationalization
  • Add ui/lib/i18n/locales/en.ts and zh.ts locale files
  • Add LanguageSwitcher component in the sidebar footer

Translation coverage:

  • Sidebar navigation (all menu items, sub-items, descriptions)

  • All workspace pages (providers, logs, dashboard, governance, plugins, observability, routing-rules, mcp-registry, model-catalog, model-limits, virtual-keys, custom-pricing, config, etc.)

  • All enterprise fallback unlock views (rbac, scim, businessUnits, teams, users, adaptiveRouting, cluster, guardrails, accessProfiles, auditLogs, apiKeys, mcpToolGroups, login, etc.)

  • Common texts (error pages, 404, empty states, buttons, tooltips, etc.)

  • Default language set to English (lng: "en"), users can switch to Chinese via the language switcher

  • Language preference persisted in localStorage (key: bifrost_language)

Type of change

  • Feature

Affected areas

  • UI (React)

How to test

cd ui
npm install
npm run build

Validation steps:

  1. Start dev server (make dev)
  2. Language switcher should appear at the bottom of the sidebar
  3. Click to switch to Chinese — all UI text should update to Chinese
  4. Refresh the page — language preference should persist
  5. Switch back to English — all text should restore to English

Screenshots/Recordings

(Attach English/Chinese switch screenshots)

Breaking changes

  • No

Related issues

(Add related issues if applicable, e.g. Closes #xxx)

Security considerations

No security implications. This PR only affects frontend UI text display — no API keys, authentication, or data processing changes.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 5, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Important

Review skipped

Too many files!

This PR contains 183 files, which is 33 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 07e727f8-cc61-45f0-b437-94cd99887581

📥 Commits

Reviewing files that changed from the base of the PR and between c80c532 and 4e27eb9.

⛔ Files ignored due to path filters (1)
  • ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (183)
  • config.json
  • docs/providers/performance.mdx
  • ui/app/__error.tsx
  • ui/app/__notFound.tsx
  • ui/app/_fallbacks/enterprise/components/access-profiles/accessProfilesIndexView.tsx
  • ui/app/_fallbacks/enterprise/components/adaptive-routing/adaptiveRoutingView.tsx
  • ui/app/_fallbacks/enterprise/components/api-keys/apiKeysIndexView.tsx
  • ui/app/_fallbacks/enterprise/components/audit-logs/auditLogsView.tsx
  • ui/app/_fallbacks/enterprise/components/cluster/clusterView.tsx
  • ui/app/_fallbacks/enterprise/components/guardrails/guardrailsConfigurationView.tsx
  • ui/app/_fallbacks/enterprise/components/guardrails/guardrailsProviderView.tsx
  • ui/app/_fallbacks/enterprise/components/login/loginView.tsx
  • ui/app/_fallbacks/enterprise/components/mcp-tool-groups/mcpToolGroups.tsx
  • ui/app/_fallbacks/enterprise/components/rbac/rbacView.tsx
  • ui/app/_fallbacks/enterprise/components/scim/scimView.tsx
  • ui/app/_fallbacks/enterprise/components/user-groups/businessUnitsView.tsx
  • ui/app/_fallbacks/enterprise/components/user-groups/teamsView.tsx
  • ui/app/_fallbacks/enterprise/components/user-groups/usersView.tsx
  • ui/app/_fallbacks/enterprise/components/views/contactUsView.tsx
  • ui/app/_fallbacks/enterprise/lib/store/apis/accessProfileApi.ts
  • ui/app/_fallbacks/enterprise/lib/store/apis/scimApi.ts
  • ui/app/_fallbacks/enterprise/lib/store/apis/virtualKeyUsersApi.ts
  • ui/app/_fallbacks/enterprise/lib/types/accessProfile.ts
  • ui/app/_fallbacks/enterprise/lib/types/user.ts
  • ui/app/main.tsx
  • ui/app/workspace/cluster/page.tsx
  • ui/app/workspace/config/views/cachingView.tsx
  • ui/app/workspace/config/views/clientSettingsView.tsx
  • ui/app/workspace/config/views/compatibilityView.tsx
  • ui/app/workspace/config/views/loggingView.tsx
  • ui/app/workspace/config/views/mcpView.tsx
  • ui/app/workspace/config/views/modelSettingsView.tsx
  • ui/app/workspace/config/views/performanceTuningView.tsx
  • ui/app/workspace/config/views/pluginsForm.tsx
  • ui/app/workspace/config/views/securityView.tsx
  • ui/app/workspace/custom-pricing/overrides/pricingFieldSelector.tsx
  • ui/app/workspace/custom-pricing/overrides/pricingOverrideSheet.tsx
  • ui/app/workspace/custom-pricing/overrides/pricingOverridesEmptyState.tsx
  • ui/app/workspace/custom-pricing/overrides/scopedPricingOverridesView.tsx
  • ui/app/workspace/dashboard/components/charts/chartCard.tsx
  • ui/app/workspace/dashboard/components/charts/externalCacheTokenMeterChart.tsx
  • ui/app/workspace/dashboard/components/charts/localCacheTokenMeterChart.tsx
  • ui/app/workspace/dashboard/components/charts/logVolumeChart.tsx
  • ui/app/workspace/dashboard/components/modelRankingsTab.tsx
  • ui/app/workspace/dashboard/page.tsx
  • ui/app/workspace/docs/page.tsx
  • ui/app/workspace/governance/teams/page.tsx
  • ui/app/workspace/governance/users/page.tsx
  • ui/app/workspace/governance/views/customerDialog.tsx
  • ui/app/workspace/governance/views/customerTable.tsx
  • ui/app/workspace/governance/views/customersEmptyState.tsx
  • ui/app/workspace/governance/views/teamDialog.tsx
  • ui/app/workspace/governance/views/teamsEmptyState.tsx
  • ui/app/workspace/governance/views/teamsTable.tsx
  • ui/app/workspace/governance/virtual-keys/page.tsx
  • ui/app/workspace/logs/page.tsx
  • ui/app/workspace/logs/sheets/logDetailView.tsx
  • ui/app/workspace/logs/sheets/sessionDetailsSheet.tsx
  • ui/app/workspace/logs/views/columns.tsx
  • ui/app/workspace/logs/views/emptyState.tsx
  • ui/app/workspace/logs/views/logChatMessageView.tsx
  • ui/app/workspace/logs/views/logResponsesMessageView.tsx
  • ui/app/workspace/logs/views/logsTable.tsx
  • ui/app/workspace/logs/views/logsVolumeChart.tsx
  • ui/app/workspace/logs/views/ocrView.tsx
  • ui/app/workspace/mcp-logs/page.tsx
  • ui/app/workspace/mcp-logs/views/columns.tsx
  • ui/app/workspace/mcp-logs/views/emptyState.tsx
  • ui/app/workspace/mcp-logs/views/mcpHeaderView.tsx
  • ui/app/workspace/mcp-logs/views/mcpLogDetailsSheet.tsx
  • ui/app/workspace/mcp-registry/views/mcpClientForm.tsx
  • ui/app/workspace/mcp-registry/views/mcpClientSheet.tsx
  • ui/app/workspace/mcp-registry/views/mcpClientsTable.tsx
  • ui/app/workspace/mcp-registry/views/mcpServersEmptyState.tsx
  • ui/app/workspace/mcp-registry/views/oauth2Authorizer.tsx
  • ui/app/workspace/model-catalog/views/modelCatalogEmptyState.tsx
  • ui/app/workspace/model-catalog/views/modelCatalogTable.tsx
  • ui/app/workspace/model-catalog/views/modelCatalogView.tsx
  • ui/app/workspace/model-limits/views/modelLimitSheet.tsx
  • ui/app/workspace/model-limits/views/modelLimitsEmptyState.tsx
  • ui/app/workspace/model-limits/views/modelLimitsTable.tsx
  • ui/app/workspace/model-limits/views/modelLimitsView.tsx
  • ui/app/workspace/observability/fragments/maximFormFragment.tsx
  • ui/app/workspace/observability/fragments/otelFormFragment.tsx
  • ui/app/workspace/observability/fragments/prometheusFormFragment.tsx
  • ui/app/workspace/observability/views/observabilityView.tsx
  • ui/app/workspace/observability/views/plugins/maximView.tsx
  • ui/app/workspace/observability/views/plugins/otelView.tsx
  • ui/app/workspace/observability/views/plugins/prometheusView.tsx
  • ui/app/workspace/plugins/dialogs/confirmDeletePluginDialog.tsx
  • ui/app/workspace/plugins/fragments/pluginFormFragments.tsx
  • ui/app/workspace/plugins/page.tsx
  • ui/app/workspace/plugins/sheets/addNewPluginSheet.tsx
  • ui/app/workspace/plugins/sheets/pluginSequenceSheet.tsx
  • ui/app/workspace/plugins/views/pluginsEmptyState.tsx
  • ui/app/workspace/plugins/views/pluginsView.tsx
  • ui/app/workspace/providers/dialogs/addNewCustomProviderSheet.tsx
  • ui/app/workspace/providers/dialogs/confirmDeleteProviderDialog.tsx
  • ui/app/workspace/providers/dialogs/confirmRedirection.tsx
  • ui/app/workspace/providers/dialogs/providerConfigSheet.tsx
  • ui/app/workspace/providers/fragments/allowedRequestsFields.tsx
  • ui/app/workspace/providers/fragments/apiKeysFormFragment.tsx
  • ui/app/workspace/providers/fragments/apiStructureFormFragment.tsx
  • ui/app/workspace/providers/fragments/betaHeadersFormFragment.tsx
  • ui/app/workspace/providers/fragments/debuggingFormFragment.tsx
  • ui/app/workspace/providers/fragments/governanceFormFragment.tsx
  • ui/app/workspace/providers/fragments/networkFormFragment.tsx
  • ui/app/workspace/providers/fragments/openaiConfigFormFragment.tsx
  • ui/app/workspace/providers/fragments/performanceFormFragment.tsx
  • ui/app/workspace/providers/fragments/proxyFormFragment.tsx
  • ui/app/workspace/providers/page.tsx
  • ui/app/workspace/providers/views/addProviderDropdown.tsx
  • ui/app/workspace/providers/views/modelProviderConfig.tsx
  • ui/app/workspace/providers/views/modelProviderKeysTableView.tsx
  • ui/app/workspace/providers/views/providerGovernanceTable.tsx
  • ui/app/workspace/providers/views/providerKeyForm.tsx
  • ui/app/workspace/providers/views/providersEmptyState.tsx
  • ui/app/workspace/routing-rules/tree/views/node/rfRuleNode.tsx
  • ui/app/workspace/routing-rules/tree/views/node/rfSourceNode.tsx
  • ui/app/workspace/routing-rules/tree/views/routingTreeView.tsx
  • ui/app/workspace/routing-rules/views/routingRuleInfoSheet.tsx
  • ui/app/workspace/routing-rules/views/routingRuleSheet.tsx
  • ui/app/workspace/routing-rules/views/routingRulesEmptyState.tsx
  • ui/app/workspace/routing-rules/views/routingRulesView.tsx
  • ui/app/workspace/scim/page.tsx
  • ui/app/workspace/virtual-keys/hooks/useVirtualKeyUsage.ts
  • ui/app/workspace/virtual-keys/views/virtualKeyDetailsSheet.tsx
  • ui/app/workspace/virtual-keys/views/virtualKeySheet.tsx
  • ui/app/workspace/virtual-keys/views/virtualKeysEmptyState.tsx
  • ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx
  • ui/components/languageSwitcher.tsx
  • ui/components/loggingDisabledView.tsx
  • ui/components/noPermissionView.tsx
  • ui/components/notAvailableBanner.tsx
  • ui/components/prompts/components/alerts.tsx
  • ui/components/prompts/components/apiKeySelectorView.tsx
  • ui/components/prompts/components/emptyState.tsx
  • ui/components/prompts/components/messagesView/assistantMessageView.tsx
  • ui/components/prompts/components/messagesView/attachmentViews.tsx
  • ui/components/prompts/components/messagesView/errorMessageView.tsx
  • ui/components/prompts/components/messagesView/messageRoleSwitcher.tsx
  • ui/components/prompts/components/messagesView/systemMessageView.tsx
  • ui/components/prompts/components/messagesView/toolCallResultView.tsx
  • ui/components/prompts/components/messagesView/toolCallView.tsx
  • ui/components/prompts/components/messagesView/userMessageView.tsx
  • ui/components/prompts/components/newMessageInputView.tsx
  • ui/components/prompts/components/promptsViewHeader.tsx
  • ui/components/prompts/components/variablesTableView.tsx
  • ui/components/prompts/context.tsx
  • ui/components/prompts/fragments/settingsPanel.tsx
  • ui/components/prompts/fragments/sidebar.tsx
  • ui/components/prompts/promptsView.tsx
  • ui/components/prompts/sheets/commitVersionSheet.tsx
  • ui/components/prompts/sheets/folderSheet.tsx
  • ui/components/prompts/sheets/promptSheet.tsx
  • ui/components/rateLimitDisplay.tsx
  • ui/components/sidebar.tsx
  • ui/components/trialExpiryBanner.tsx
  • ui/components/ui/asyncMultiselect.tsx
  • ui/components/ui/badge.tsx
  • ui/components/ui/combobox.tsx
  • ui/components/ui/custom/celBuilder/celRuleBuilder.tsx
  • ui/components/ui/custom/celBuilder/valueEditor.tsx
  • ui/components/ui/dialog.tsx
  • ui/components/ui/envVarInput.tsx
  • ui/components/ui/multibudgets.tsx
  • ui/components/ui/popover.tsx
  • ui/components/ui/select.tsx
  • ui/components/ui/sheet.tsx
  • ui/components/ui/tooltip.tsx
  • ui/lib/constants/icons.tsx
  • ui/lib/i18n/index.ts
  • ui/lib/i18n/locales/en.ts
  • ui/lib/i18n/locales/zh.ts
  • ui/lib/store/apis/devApi.ts
  • ui/lib/types/logs.ts
  • ui/lib/types/schemas.ts
  • ui/lib/utils.ts
  • ui/lib/utils/browser-download.ts
  • ui/lib/utils/envVarForm.ts
  • ui/lib/utils/governance.ts
  • ui/lib/utils/routingRuleGroupQuery.ts
  • ui/package.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add react-i18next with language switcher component
- Add English (en) and Chinese (zh) locale files
- Translate sidebar, all workspace pages, enterprise fallback views
- Set English as default language
- Add language switcher to sidebar footer
@m7rick m7rick force-pushed the feat/add-i18n-support branch from 8fc5e5e to a608863 Compare May 5, 2026 02:59
@m7rick
Copy link
Copy Markdown
Author

m7rick commented May 5, 2026

I've updated the branch with the latest upstream/main and resolved the merge conflicts. The remaining Snyk failure appears to be due to the private test quota limit, and the workflows are awaiting maintainer approval.

m7rick added 3 commits May 6, 2026 21:52
- Add translations for OAuth client ID, secret, authorization URL, token URL, registration URL
- Add scopes label and placeholder
- Update mcpClientForm to use i18n.t() for all OAuth-related hardcoded strings
- Add corresponding Chinese translations
# Conflicts:
#	ui/app/workspace/mcp-registry/views/mcpClientSheet.tsx
#	ui/app/workspace/providers/dialogs/addNewCustomProviderSheet.tsx
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.

2 participants