Skip to content

feat(i18n): add Russian locale and count-based tab pluralization#229

Merged
debba merged 1 commit into
TabularisDB:mainfrom
verbaux:feat/i18n-ru
May 20, 2026
Merged

feat(i18n): add Russian locale and count-based tab pluralization#229
debba merged 1 commit into
TabularisDB:mainfrom
verbaux:feat/i18n-ru

Conversation

@verbaux
Copy link
Copy Markdown
Contributor

@verbaux verbaux commented May 20, 2026

Add Russian (ru) localization

Adds Russian as the 8th supported UI language, plus a tab-counter pluralization fix.

What's included

New language — Russian

  • src/i18n/locales/ru.json — full Russian translation
  • README.ru.md — translated README
  • Registered ru ("Русский") in src/i18n/config.ts SUPPORTED_LANGUAGES
  • Added Russian to the language switcher and "Available in" list across all README.* files; also restored the missing ja entry in the README config-language docs

Pluralization fix — editor.tabSwitcher.tabs

  • TabSwitcherModal.tsx now passes the count into i18next (t("editor.tabSwitcher.tabs", { count })) instead of concatenating the number outside the call, so plural rules can apply.
  • Plural-suffixed keys added per CLDR rules:
    • ru: _one / _few / _many / _other (4 forms)
    • en / de / es / fr: _one / _other
    • it / ja / zh: single form (no singular/plural distinction needed)
  • Fixes English rendering "1 tabs" → "1 tab".

Test plan

  • All 8 locale JSON files parse as valid JSON
  • Key parity vs en.json (extra ru keys are Russian plural forms — expected)
  • pnpm lint passes (eslint, 0 warnings)
  • Pluralization verified empirically against i18next v25 for counts
    1 / 2 / 5 / 21 across all 8 languages — each renders its own localized
    form (e.g. ru 1→"вкладка", 2→"вкладки", 5→"вкладок", 21→"вкладка"),
    with no English-fallback leak for the single-form locales (it/ja/zh)
  • Manual smoke: switch UI to Русский, confirm tab switcher, settings,
    schema/column editor, and visual-explain panels render correctly
  • Verify README.ru.md renders on GitHub and language links resolve

Known limitations

The following UI areas are not wired into i18n — they render hardcoded English:

  • Visual Query Builder (src/components/ui/VisualQueryBuilder.tsx + its canvas node src/components/ui/TableNode.tsx).
  • AI Query modal (src/components/modals/AiQueryModal.tsx).
  • Mini result grid (src/components/ui/MiniResultGrid.tsx).

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented May 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (18 files)
  • src/components/modals/TabSwitcherModal.tsx — passes count into t() for proper pluralization
  • src/i18n/config.ts — Russian locale registered correctly
  • src/i18n/locales/ru.json — valid JSON, complete translation, correct Russian CLDR plural forms (_one/_few/_many/_other)
  • src/i18n/locales/en.json — tab pluralization fix (_one/_other)
  • src/i18n/locales/de.json — tab pluralization fix (_one/_other)
  • src/i18n/locales/es.json — tab pluralization fix (_one/_other)
  • src/i18n/locales/fr.json — tab pluralization fix (_one/_other)
  • src/i18n/locales/it.json — tab pluralization fix ({{count}} in base key)
  • src/i18n/locales/ja.json — tab pluralization fix ({{count}} in base key)
  • src/i18n/locales/zh.json — tab pluralization fix ({{count}} in base key)
  • README.md — Russian link and language list updated; restored missing ja entry in config docs
  • README.ru.md — new Russian README, faithful translation
  • README.de.md, README.es.md, README.fr.md, README.it.md, README.ja.md, README.zh-CN.md — Russian link added

Reviewed by kimi-k2.6 · 7,402,791 tokens

@debba
Copy link
Copy Markdown
Collaborator

debba commented May 20, 2026

Hi!

Thank you so much for this contribution.

As usual with translations, I fully trust the people who contribute them. Unfortunately I don’t know Russian, so reading this language is basically like navigating in the dark for me.

In general, I’m always very happy to see your PRs. If you’d like, you’re also welcome to join us on Discord: https://discord.com/invite/K2hmhfHRSt

I’ll merge this in the next few minutes.

@debba debba merged commit 78bf343 into TabularisDB:main May 20, 2026
2 checks passed
@verbaux
Copy link
Copy Markdown
Contributor Author

verbaux commented May 20, 2026

🫡 hi @debba

I didn’t just translate it with AI — I also validate all the translations to make them sound more natural. Ofc, in my opinion :) But before I started developing, I worked as an editor and copywriter, so I think I haven’t forgotten everything yet, :)

I joined Discord, thanks!

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