Skip to content

Add i18n support with Russian language#4987

Open
agrloki wants to merge 107 commits into
odysseus-dev:devfrom
agrloki:dev
Open

Add i18n support with Russian language#4987
agrloki wants to merge 107 commits into
odysseus-dev:devfrom
agrloki:dev

Conversation

@agrloki

@agrloki agrloki commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Adds a complete internationalization (i18n) system to the Odysseus frontend with Russian as the first non-English language. ~2830 translation keys covering all UI modules, two locale files (en/ru), and a lightweight custom i18n engine.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #58

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.

How to Test

  • Docker container running on port 7000
  • Login
  • Auth enabled (AUTH_ENABLED=true)

Step 1: Verify language switcher works

  1. Open http://localhost:7000 in browser
  2. Log
  3. Click the gear icon (Settings) in the sidebar
  4. Navigate to Appearance tab → Language section
  5. Change "Interface language" dropdown from English to Русский
  6. Page should reload automatically
  7. Verify the sidebar labels are now in Russian (Поиск, Новый чат, Чаты, etc.)

Step 2: Test sidebar navigation

  1. Verify all sidebar tool labels are translated: Поиск, Новый чат, Чаты, Почта, Модели, Заметки, Задачи, Галерея, Библиотека, Календарь, Сравнение, Книга рецептов, Память
  2. Verify sidebar section headers: Настройки, Папки, Архив
  3. Verify "New Chat" button text
  4. Verify search placeholder text

Step 3: Test Settings modal — Appearance tab

  1. Open Settings → Appearance
  2. Verify all section headings are translated: Боковая панель, Область чата, Панель чата, Язык
  3. Verify all toggle labels: Поиск, Новый чат, Чаты, Почта, Модели, Инструменты, Мозг, Календарь, Сравнение, Книга рецептов, Глубокое исследование, Галерея, Библиотека, Заметки, Задачи, Тема, Пользователь, Кнопка настроек
  4. Verify hint text under labels (e.g. "Аватар и имя", "Список истории чатов")
  5. Verify Chat Area section: Заголовок сессии, Чат на всю ширину, Приветственное сообщение, Режим инкогнито, etc.
  6. Verify Chat Bar section: Веб-поиск, Редактор документов, Терминал, Ещё инструменты, etc.

Step 4: Test Settings modal — Shortcuts tab

  1. Open Settings → Shortcuts
  2. Verify header: "Клавиатурные сокращения"
  3. Verify category names: Навигация, Сессии, Инструменты, Открытие инструментов
  4. Verify shortcut labels: Поиск разговоров, Показать/скрыть боковую панель, Новая сессия, etc.
  5. Verify "Назначить" label on unbound shortcuts

Step 5: Test other Settings tabs

  1. AI tab — verify model selector labels, hints
  2. Integrations — verify endpoint labels, API key placeholders
  3. Account — verify "Аккаунт", "Смена пароля", "Выйти"
  4. Admin tabs (if admin user) — verify Users, System, Agent Tools labels

Step 6: Test chat functionality

  1. Start a new chat session
  2. Verify welcome screen tips are translated
  3. Send a message and verify chat UI elements
  4. Verify TTS button tooltip
  5. Verify incognito mode toggle text

Step 7: Test modules

  1. Calendar — open calendar tool, verify view tabs (Неделя/Месяц/Год/Повестка), weekday names, month names, modal labels
  2. Tasks — open tasks tool, verify form labels, status names, action buttons
  3. Gallery — verify tabs, filter labels, empty states
  4. Notes — verify header, bulk actions, chip labels
  5. Document Library — verify tabs (Все, Избранные, Недавние), search placeholder
  6. Cookbook — verify tab names (Запуск/Загрузка/Зависимости/Настройки)
  7. Deep Research — verify settings labels, buttons
  8. Compare — verify mode descriptions, button labels (including the Start button)
  9. Email — verify folder names, reader labels
  10. Skills — verify form labels, status names

Step 8: Switch back to English

  1. Open Settings → Appearance → Language
  2. Switch to English
  3. Verify entire UI returns to English
  4. Verify no raw key names (like settings.vis.brain) appear anywhere

Step 9: Test browser persistence

  1. Set language to Russian
  2. Close browser tab
  3. Reopen http://localhost:7000
  4. Verify language is still Russian (stored in localStorage)

Step 10: Check browser console

  1. Open DevTools → Console
  2. Reload the page
  3. Verify no i18n errors, no missing key warnings
  4. Verify no __t is not defined errors

Visual / UI changes — REQUIRED if you touched anything that renders

Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any static/js/ module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.

  • Screenshot or short clip of the change in the running app, attached below. Mobile screenshot too if the change affects mobile.
  • Style match: the change uses Odysseus's existing visual language. Specifically:
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values, font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel one.
  • I am not an LLM agent submitting a bulk PR. If you are, please open an issue describing the problem first — bulk auto-generated PRs that don't match the project's visual style are closed on sight, even when the underlying fix is correct.

Screenshots / clips

image image image

@github-actions github-actions Bot added needs work PR description incomplete — please update before review merge conflict Conflicts with the base branch; needs a rebase before review. ready for review Description complete — ready for maintainer review and removed needs work PR description incomplete — please update before review labels Jun 28, 2026
@github-actions github-actions Bot added ready for review Description complete — ready for maintainer review and removed ready for review Description complete — ready for maintainer review labels Jun 28, 2026
@github-actions github-actions Bot removed the merge conflict Conflicts with the base branch; needs a rebase before review. label Jun 28, 2026
…ests for i18n

- Added `from __future__ import annotations` to 36 source files for
  Python 3.9 compatibility (upstream uses 3.10+ PEP 604 union syntax)
- Added tests/__init__.py (missing module marker)
- Updated 5 tests to match i18n replacements of hardcoded English strings:
  - test_document_deeplink: doc.documentNotFound
  - test_upload_error_surfaced: settings.failedToSave
  - test_cookbook_download_toast_duration: cookbook.downloadFailed
  - test_local_endpoint_api_key_js: added window.__t shim
  - test_setup_llamacpp_hint_js: upstream removed llama-server string
agrloki added 4 commits June 30, 2026 21:31
# Conflicts:
#	routes/memory_routes.py
#	src/tool_implementations.py
- Root files: README, CONTRIBUTING, SECURITY, THREAT_MODEL, ROADMAP, ACKNOWLEDGMENTS
  translated to Russian; originals preserved as *_en.md
- docs/: setup, backup-restore, security-ci, agent-migration, email-outlook,
  pr-blocker-audit moved to docs/en/; Russian translations in docs/ru/
- Internal links updated to point to docs/ru/ in Russian files
agrloki added 5 commits July 2, 2026 11:58
# Conflicts:
#	routes/cookbook_routes.py
#	src/tool_implementations.py
#	src/tools/calendar.py
#	static/app.js
#	static/index.html
#	static/js/admin.js
#	static/js/calendar.js
#	static/js/chat.js
#	static/js/cookbook-hwfit.js
#	static/js/cookbookServe.js
#	static/js/document.js
#	static/js/emailLibrary.js
#	static/js/gallery.js
#	static/js/research/panel.js
#	static/js/sessions.js
#	static/js/settings.js
#	static/js/tasks.js
#	tests/test_cookbook_cpu_only_serve.py
Upstream added tests that import src/tools/* which was removed during
the i18n merge. Restored from upstream/dev.
… status, admin privileges)

- Email Translation card: data-i18n for auto-translate toggle, translate-to input
- Search tab: labels for URL, API Key, CX ID, Fallbacks, Test button
- settings.js: wrapped status messages (max tokens, extract, parallel, agent limits)
- admin.js: wrapped PRIV_LABELS and endpoint placeholders with __t()
- Added ~38 new locale keys to en.js and ru.js (2868 total)
@github-actions github-actions Bot added merge conflict Conflicts with the base branch; needs a rebase before review. ready for review Description complete — ready for maintainer review and removed ready for review Description complete — ready for maintainer review labels Jul 5, 2026
# Conflicts:
#	tests/run_focus.py
@github-actions github-actions Bot removed the merge conflict Conflicts with the base branch; needs a rebase before review. label Jul 5, 2026
- Add kokoro + soundfile to requirements-optional.txt
- Add CPU fallback to _KokoroPipeline (auto-detects CUDA, falls back to CPU)
- Update Dockerfile with INSTALL_SPEECH/INSTALL_SPEECH_GPU build args
- Add docker/speech.yml and docker/speech.gpu.yml compose overlays
- Add stt_health() and tts_health() to service diagnostics
- Add .env.example documentation for local speech setup
- Add scripts/prefetch-speech-models.py for model pre-download
agrloki added 18 commits July 12, 2026 10:17
@github-actions github-actions Bot added ready for review Description complete — ready for maintainer review merge conflict Conflicts with the base branch; needs a rebase before review. and removed ready for review Description complete — ready for maintainer review labels Jul 12, 2026
@github-actions github-actions Bot removed the merge conflict Conflicts with the base branch; needs a rebase before review. label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add multilingual/i18n support for the UI

1 participant