Skip to content

feat(i18n): add Russian panel localization - #351

Merged
karutoil merged 3 commits into
catalystctl:mainfrom
HotTabGit:feat/russian-localization
Nov 13, 2026
Merged

karutoil merged 3 commits into
catalystctl:mainfrom
HotTabGit:feat/russian-localization

Conversation

@HotTabGit

Copy link
Copy Markdown
Contributor

Add Russian (ru, displayed as Русский) to the language picker and instance-wide default settings. Russian-speaking operators can use the panel in Russian with the official build. The change includes the frontend catalogs and translations for account emails and alerts.

Validation

  • node scripts/i18n-check.mjs --strict passed with all 4,801 frontend keys covered.
  • The production frontend build completed.
  • A Catalyst 1.88.11 deployment served Russian as the configured default.

The catalogs are ready for review, and wording feedback is welcome.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Two things to address before this ships: the extractor config was not updated for ru, and Russian plural forms are incomplete. Both are explained below.

Reviewed changes

  • Russian locale registered — adds ru to the backend SUPPORTED_LOCALES (catalyst-backend/src/i18n/locales.ts), the frontend locale registry (catalyst-frontend/src/i18n/config.ts), and the synchronously bundled namespaces (catalyst-frontend/src/i18n/index.ts); imports locales/ru/email.json in catalyst-backend/src/i18n/translate.ts.
  • Russian catalogs — 19 frontend namespace files under catalyst-frontend/src/i18n/locales/ru/ and the backend ru/email.json. I compared them against en programmatically: key sets match exactly (4,801 keys, none missing or extra), every {{placeholder}} set matches, and there are no empty values. node scripts/i18n-check.mjs --strict passes.

⚠️ ru is missing from the extractor's locale list

catalyst-frontend/i18next.config.ts still declares locales: ['en', 'fr', 'zh-CN']. The extractor only reads and writes the locales configured there, so pnpm i18n:extract will never touch src/i18n/locales/ru/, and pnpm i18n:verify in CI will not detect drift in it. The next time a string is added to en, ru will silently stay untranslated (CI's non-strict i18n:check only prints a coverage number), and the ru catalog stops being maintained by the tooling that owns key order. It is also the reason the ru catalogs only carry _one/_other instead of Russian's four CLDR categories — compare fr, which the extractor manages and which does include _many.

Technical details
# Register `ru` with the i18next extractor

## Affected sites
- `catalyst-frontend/i18next.config.ts:4` — `locales: ['en', 'fr', 'zh-CN']` is the only list that omits `ru`.

## Evidence
- `i18next-cli` `dist/esm/extractor/core/translation-manager.js` iterates `config.locales` for file writes (line ~1177) and for per-locale plural-form generation (lines ~243, ~625: "For non-primary locales: generate the forms that locale actually needs").
- CI runs `pnpm --filter catalyst-frontend run i18n:verify` (`.github/workflows/ci.yml:194`), which is `i18next-cli extract --ci --dry-run`; with `ru` unlisted it never inspects `ru/`.
- `fr` carries `one/many/other`, `zh-CN` carries `other`, `ru` carries `one/other` — the same shape as `en`, i.e. it was hand-copied rather than generated.

## Required outcome
- `ru` is listed in `i18next.config.ts` so extract/verify manage the catalog and generate its CLDR plural categories.

## Suggested approach
- Add `'ru'` to `locales`, then run `pnpm i18n:extract` and fill the `_few`/`_many` values it introduces.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using pullfrog | 𝕏

@pullfrog

pullfrog Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Both points from the review are addressed in commit 05258b3:

  • ru is now in catalyst-frontend/i18next.config.ts's locales list, so i18n:extract/i18n:verify own the catalog and generate CLDR plural categories for it.
  • Ran i18n:extract to emit _few/_many, then filled all four forms (one/few/many/other) for the 129 plural bases across 12 namespaces, and corrected the _one values that had been copied from _other (e.g. {{count}} событие, {{count}} роль). Verified at runtime with i18next: 1 → «1 событие», 2–4 → «события», 5/11 → «событий», 21 → «событие».

Checks: node scripts/i18n-check.mjs --strict (100% for fr/ru/zh-CN, 4801 keys), i18n:verify ("No files were updated"), i18n:hardcoded, and the frontend src/i18n Vitest suite (48 tests) all pass; no empty values and placeholder/<bold> parity against en is clean.

Pullfrog  | View workflow run | via Pullfrog | Using pullfrog | 𝕏

pullfrog Bot and others added 2 commits November 13, 2026 12:03
…ractor

Add ru to the i18next extractor locale list so `i18n:extract`/`i18n:verify` manage the catalog, then fill the generated `_few`/`_many` keys and fix the `_one` forms that were copied from `_other` (129 plural bases across 12 namespaces).
Review follow-up to the ru catalog. Behaviour is unchanged; every item is
copy that was wrong or inconsistent with the English source:

- Product and brand names stay in Latin script, as the repo documents:
  Catalyst, Pterodactyl, Pelican, Modrinth, Paymenter and WebSocket were
  transliterated into Cyrillic («катализатор», «птеродактиль», «Пеликан»,
  «Модринт», «плательщик», «веб-сокет»), including the login page's
  "Continue with Paymenter" button and "Welcome to Catalyst".
- "passkey" is «ключ доступа», never «пароль»: auth.passkey.signIn rendered
  "Sign in with passkey" as «Войти с помощью пароля», which means password.
  auth.passkey.dialogTitle and auth.passkey.failed had the same slip.
- Pterodactyl's domain terms stay as the Russian Pterodactyl wording already
  used throughout the catalog (яйца, гнёзда); only the brand, the label form
  of "Import All Pterodactyl Eggs" and the "No nests" grammar changed.
- Terminal punctuation now follows the English source instead of adding a
  full stop: 198 strings had a period the source does not have, 136 of them
  short labels, toasts and buttons (e.g. a button reading
  «Выберите 1.2.3.4:25565.»).
- Meaning fixes: errors.ACCOUNT_BANNED said «Действие этого аккаунта
  приостановлено» (the account's action was suspended); admin-environment
  toast.reset said «сбрасывается до среды» (reads as "until Wednesday");
  tasks.repeatSummary.weekly rendered "at {{time}}" as «по адресу»;
  pluginsAdmin.originEnv ("Env") became «Конв.»; a permission label became
  an imperative; files.sftp.you addressed the operator as «Ты» while the
  rest of the catalog uses «Вы»; the backup and file download failures said
  «загрузить» (upload) where the source says download.
- Dropped zero-width spaces left in eight strings by a translation tool.

The ru entry now also sits after fr in both locale lists, so the picker reads
English, Français, Русский, 简体中文.

Verified: i18n:check --strict (ru 4801/4801), i18next-cli extract --ci
--dry-run (no file updates), i18n:hardcoded, backend lint/typecheck,
frontend lint/tsc, vitest i18n suites, and the login page in a browser
switching to Русский.
@karutoil
karutoil merged commit 562bee6 into catalystctl:main Nov 13, 2026
1 check failed
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