Skip to content

docs: Russian locale for the documentation site - #11

Merged
helldweller merged 1 commit into
mainfrom
feat/docs-ru
Oct 26, 2026
Merged

helldweller merged 1 commit into
mainfrom
feat/docs-ru

Conversation

@helldweller

Copy link
Copy Markdown
Owner

What

Second locale for the Docusaurus site: Russian, served at https://helldweller.github.io/dispatch/ru/.

  • docusaurus.config.js: locales: ["en", "ru"], locale dropdown in the navbar, language: ["en", "ru"] for @cmfcmf/docusaurus-search-local.
  • Theme strings, navbar, footer and sidebar category labels in docs/i18n/ru/*.json.
  • 67 translated pages under docs/i18n/ru/docusaurus-plugin-content-docs/current/: user guide, administration (installation, upgrading, CLI, FAQ, users), all settings pages including the plugin guides, support, changelog. Terminology matches the application UI translation from feat: UI localization with vue-i18n and a per-user language setting #9 (incident → инцидент, case → кейс, signal → сигнал, on-call → дежурный, …). Product names, commands, config keys, env vars, code blocks, URLs and third-party UI navigation stay in English.
  • Not translated, served in English under /ru/ with the sidebar label saying so: the contributing section, the license, the API reference (rendered from openapi.yaml).

English sources touched

  • docusaurus write-heading-ids added explicit {#id} anchors to headings on the translated pages (35 files, text unchanged) so anchors survive translated headings.
  • _category_.json with a key for both Plugins directories: write-translations refuses duplicate sidebar keys.
  • settings/plugins/index.mdx: two links switched from file paths (../../cli.mdx#plugins, ../server.mdx) to URL-relative (../cli#plugins, server). File-path links between a translated page and an English fallback page break the ru build because each resolves against its own source directory; URL-relative links work in both locales. Same change in the Russian copies of cli.mdx and plugins/index.mdx for links into the untranslated contributing section.

Checks

npm run build builds both locales (77 pages each) with no warnings, npm run check-command-links and npm test pass. Each translated file was compared with its source on the number of code fences, headings and {#id} anchors and on byte-identical link targets; a scan for untranslated English paragraphs finds none. Rendered pages checked in a local docusaurus serve.

🤖 Generated with Claude Code

Enables the ru locale in Docusaurus with a language dropdown and Russian
stemming for the local search, translates the theme strings, navbar,
footer and sidebar labels, and adds Russian copies of 67 pages: user
guide, administration (installation, upgrading, CLI, FAQ, users), every
settings page including the plugin guides, support and changelog. The
contributing section, the license and the API reference stay English and
are served as such under /ru/, with the sidebar label marking it.

Translated pages keep the original heading ids: write-heading-ids added
explicit {#id} anchors to the English sources first, so links into those
pages do not change with the heading text. The two "Plugins" directories
get _category_.json keys so write-translations can tell them apart.

File-path links (../foo.mdx) between a translated page and an English
fallback page break the ru build, because each side resolves relative to
its own source directory; the four such links now use URL-relative paths
that work in both locales.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@helldweller helldweller added the documentation Improvements or additions to documentation label Oct 26, 2026
@helldweller
helldweller requested a balanced review from Copilot October 26, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The infrastructure, anchors, and links verify cleanly, but 67 pages of translated Russian prose require native-speaker review for meaning and terminology fidelity that cannot be confirmed automatically.

No open issues 🎉

What changed in this PR

This PR adds a second locale (Russian) to the Docusaurus documentation site, served at /dispatch/ru/. It wires up the ru locale in the site config, adds translated theme/navbar/footer/sidebar strings, and translates 67 content pages (user guide, administration, settings, plugin guides, support, changelog). The English sources are touched only to add explicit {#id} heading anchors (via docusaurus write-heading-ids) so anchors survive translation, plus two _category_.json keys and a few links switched from file-path to URL-relative form so they resolve in both locales.

Changes:

  • Enable ru locale: locales, localeConfigs, search language, and a navbar localeDropdown in docusaurus.config.js.
  • Add Russian translations (docs/i18n/ru/…) for theme strings, sidebar categories, and 67 doc pages, keeping English {#id} anchors, code fences, and image/link targets identical to the source.
  • Add explicit {#id} heading anchors to English sources (text unchanged), add keys to the two Plugins _category_.json files, and convert a few index-page links to URL-relative form.
File Description
docs/​docusaurus.config.js Adds ru to locales/localeConfigs, search language, and a localeDropdown navbar item.
docs/​i18n/​ru/​docusaurus-theme-classic/​{navbar,footer}.json Russian navbar/footer labels and copyright.
docs/​i18n/​ru/​docusaurus-plugin-content-docs/​current.json Russian sidebar category labels (keys match _category_.json).
docs/​i18n/​ru/​docusaurus-plugin-content-docs/​current/​**/​*.mdx (67 pages) Russian translations of user-guide, administration, settings and plugin docs; anchors/fences/images/link targets kept in sync with English.
docs/​docs/​**/​*.mdx (35 pages) Explicit {#id} heading anchors added to English sources (text unchanged).
docs/​docs/​administration/​settings/​plugins/​_category_.json, …/​contributing/​plugins/​_category_.json Add key to disambiguate the two Plugins categories for translation.
docs/​docs/​administration/​{cli,settings/​plugins/​index}.mdx Links switched to URL-relative form so they resolve under /ru/.

Verification performed: anchor ID sets match across all 67 EN↔RU pairs (0 mismatches); code fences are balanced and equal in count; image targets are identical; the only two link-target differences are the intentional file-path→URL-relative conversions, which resolve to the same destinations in both locales; config additions are valid. No objective functional issues were found in the reviewed diffs.

Review effort: Balanced

@helldweller
helldweller merged commit 29dc463 into main Oct 26, 2026
10 of 11 checks passed
@helldweller
helldweller deleted the feat/docs-ru branch October 26, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants