Skip to content

feat(i18n): add Russian (ru) locale#343

Open
SGribanov wants to merge 6 commits intoHKUDS:devfrom
SGribanov:feat/i18n-russian-locale
Open

feat(i18n): add Russian (ru) locale#343
SGribanov wants to merge 6 commits intoHKUDS:devfrom
SGribanov:feat/i18n-russian-locale

Conversation

@SGribanov
Copy link
Copy Markdown

Summary

  • Full Russian (ru) locale: 928 keys in app.json + 7 keys in common.json
  • Registered ru in i18n config, AppLanguage type, normalizeLanguage(), and datetime locale
  • Added "Русский" button to the language switcher in Settings
  • Added language.russian key to en and zh locale files for parity
  • npm run i18n:parity passes — all three languages are balanced

Changed files

File Change
web/locales/ru/app.json New — 928 Russian translation keys
web/locales/ru/common.json New — 7 Russian common keys
web/i18n/init.ts Import ruApp, add to resources, extend AppLanguage
web/context/AppShellContext.tsx Extend AppLanguage type, update normalizeLanguage()
web/lib/datetime.ts Add ru-RU locale mapping
web/app/(utility)/settings/page.tsx Add "ru" to language type unions and switcher UI
web/locales/en/app.json Add language.russian key
web/locales/en/common.json Add language.russian key
web/locales/zh/app.json Add language.russian key
web/locales/zh/common.json Add language.russian key

Screenshots

Language switcher now shows three options: English | 中文 | Русский

Test plan

  • npm run i18n:parity — passes (all languages have matching keys)
  • Switch to Russian in Settings → verify all UI strings are translated
  • Switch back to English/Chinese → verify no regressions
  • Verify date/time formatting uses ru-RU locale
  • Verify language persists across page reloads

- Add web/locales/ru/app.json and common.json with full Russian translation
- Register 'ru' language in i18n/init.ts resources and normalizeLanguage()
- Extend AppLanguage type to include 'ru' in AppShellContext and init.ts
- Add 'ru-RU' locale mapping in lib/datetime.ts
- Add 'Русский' button to the language switcher in settings page
- Add 'language.russian' key to en/zh app.json and common.json for parity
- i18n:parity check passes with all three languages balanced
…scover locales

- SessionList: groupLabel() and relativeTime() now use i18n instead of hardcoded English
- TutorBotRecent: relativeTime() uses Intl.RelativeTimeFormat with current locale
- Add missing keys (Last 7 days, Earlier, language.russian) to all three locales
- i18n_parity.mjs auto-discovers locale dirs instead of hardcoding en vs zh
…keys

- memory/page.tsx: wrap all 12 hardcoded strings in t() — tabs, hints,
  toasts, button labels, empty states, formatUpdatedAt fallback
- Fix variable shadowing: TABS.map(t) was hiding t() from useTranslation
- agents/page.tsx: translate "Hide/Show secret" aria-labels
- Add 14 missing keys to all 3 locales: Visualize, Summary, Profile
  hints, memory toasts, secrets, Updated label
Add 11 keys: Channels, Channels saved, Delivery, Enabled,
channel error messages, and streaming options.
Covers: learning plan form, session history, page generation states,
notebook context section, and empty states.
pack.bat — packages project to USB drive (excludes node_modules/.venv/.git)
setup_daughter.bat — auto-installs Node.js, Ollama, uv, deps, model, shortcut
start.bat — launches DeepTutor with duplicate-instance guard
@pancacake
Copy link
Copy Markdown
Collaborator

Thanks for your contribution, but currently DeepTutor is under a rapid iterating and updating, so the interfaces will keep changing in a fast speed. Therefore I'm not gonna merge this right now. Thanks again for your contribution!

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