Skip to content

feat(web): Russian (ru) locale, UI i18n migration, and dev fixes#3089

Open
algerdby wants to merge 25 commits into
eosphoros-ai:mainfrom
algerdby:feature/i18n-ru-locale
Open

feat(web): Russian (ru) locale, UI i18n migration, and dev fixes#3089
algerdby wants to merge 25 commits into
eosphoros-ai:mainfrom
algerdby:feature/i18n-ru-locale

Conversation

@algerdby

@algerdby algerdby commented May 27, 2026

Copy link
Copy Markdown

Summary

Adds full Russian (ru) support for the DB-GPT web UI, migrates hardcoded Chinese UI strings to i18n, and includes dev/runtime fixes for standalone next dev on Windows/npm.

Locale & infrastructure

  • Add web/locales/ru (common, chat, flow) with key parity to en/zh.
  • Register ru in web/app/i18n.ts (supportedLngs, fallbackLng: 'en').
  • Language switcher cycles en → zh → ru → en; Ant Design ru_RU locale.
  • scripts/check_web_i18n.py — CI-friendly key parity check.
  • Maintenance scripts: fill_ru_from_en_dict.py, apply_ru_manual_batch.py, apply_ru_common_remaining.py, sync_ru_locale_quality.py.

UI i18n migration (phase 2)

  • Replace hardcoded Chinese UI strings with t() / i18n.t() across main pages and components (playground, chat panels, share, construct flows, charts).
  • Rename legacy ui_* hash keys to semantic keys; neutral demo example cards (no vendor-specific branding).

RU quality & completeness (latest commit)

  • Complete ru/common and ru/chat translations (user-facing strings; keep universal terms like URL, PDF, DBGPTS, filenames).
  • Fix module-level i18n.t() usage (SSR-safe), flow parameter labels, knowledge recall modal strings.
  • npm overrides for d3-* v2 (fixes Cannot require() ES Module d3-shape with npm install).
  • web/.env.template documents API_BASE_URL for standalone frontend dev.
  • Softer API error handling: no toast spam on network errors when backend is down; apiInterceptors messages use i18n keys.

Out of scope (follow-up)

  • Backend Python i18n (DBGPT_LANG)
  • Hardcoded English message.success/error toasts (~15 call sites)
  • Documentation site (docs/)
  • Mobile UI smoke-test

Test plan

  • python scripts/check_web_i18n.py — all locales pass
  • cd web && cp .env.template .env.local — set API_BASE_URL=http://localhost:5670
  • Start API: uv run dbgpt start webserver --config configs/dbgpt-proxy-openai.toml (or your provider)
  • cd web && npx next dev — open http://localhost:3000
  • Toggle language en/zh/ru on sidebar; verify main playground, chat, knowledge, flow variable modal
  • Confirm skills/knowledge lists load when API is up (empty, no crash when API is down)

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added enhancement New feature or request web Module: web labels May 27, 2026
@algerdby

Copy link
Copy Markdown
Author

Ru locale will be implemented in several phases.

algerdby and others added 3 commits May 28, 2026 00:42
Replace inline Chinese labels and messages with t()/i18n.t() across chat,
construct, evaluation, and mobile pages. Add ~150 locale keys to en/zh/ru
and helper scripts to validate parity and module-level translations.

Co-authored-by: Cursor <cursoragent@cursor.com>
…I strings

- Sync ru translations from en/deploy dictionaries (no CJK left in ru/)
- Rename 147 ui_* keys to semantic names (deleted_successfully, etc.)
- Neutralize demo cards (annual report filename, generic fin-report copy)
- i18n for share replay, sidebar relative time, pagination, collapse/expand
- Add maintenance scripts for RU sync and key rename apply

Co-authored-by: Cursor <cursoragent@cursor.com>
Finish ru locale coverage for common/chat/flow, fix module-level i18n
calls and chart labels, add npm overrides for d3 on Windows, soften API
error toasts when the backend is offline, and add locale sync scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@algerdby algerdby changed the title feat(web): add Russian (ru) locale for web UI feat(web): Russian (ru) locale, UI i18n migration, and dev fixes May 27, 2026
algerdby and others added 16 commits June 1, 2026 13:50
Replace hardcoded Chinese SSE titles (思考中) with language-aware
_agent_thinking_title() / _agent_react_detail() using CFG.LANGUAGE or
DBGPT_LANG. Add clearer html_interpreter errors when file_path is missing.
Map legacy SSE strings in ManusLeftPanel via i18n keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Default UI language to ru on this branch; persist language in storage
- chat-context and index SSR/router fixes for Pages Router
- server-deploy/: Docker Compose, entrypoint patches, web build scripts
  for a localized private instance (optional; superseded by agent i18n in app)

Co-authored-by: Cursor <cursoragent@cursor.com>
useSearchParams from next/navigation crashes static Pages Router export
(Application error on /chat). Add usePageQuery() and fix ChatSider navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
HtmlTabbedRenderer, CodeExecutionRenderer, and TerminalRenderer called t() without a hook, which crashed the home page. Also read ctx-axios responses correctly when loading file preview.

Co-authored-by: Cursor <cursoragent@cursor.com>
Set AgentContext language from DBGPT_LANG, add RU workflow rules and localized SQL/status messages. Frontend localizes agent step titles and streamed thoughts via localize-agent-text.

Co-authored-by: Cursor <cursoragent@cursor.com>
Localize SQL failure messages, default lang fallback to ru, enrich ClickHouse schema context, and explain error 47 when MySQL-style INFORMATION_SCHEMA is used.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
prepare_dbgpt_src overlays openrouter branch; slim entrypoint; verify script; dbgpt-openrouter.toml in deploy configs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
algerdby and others added 5 commits June 1, 2026 18:26
Co-authored-by: Cursor <cursoragent@cursor.com>
Harden apiInterceptors for non-promise and unwrapped responses; load models client-only; fix ctx-axios helpers missing Promise.reject return.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevents ERR_INCOMPLETE_CHUNKED_ENCODING on react-agent SSE when ReActAgent lacks context API. Also COPY base_agent and react_agent from fork in Dockerfile.

Co-authored-by: Cursor <cursoragent@cursor.com>
queryAdminList stub returned [] and broke apiInterceptors on app load. Also add id/name on agent query textarea.

Co-authored-by: Cursor <cursoragent@cursor.com>
Partial COPY caused parse_current_step missing and silent agent failures. Add model fallback in handleStart.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request web Module: web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant