[PR #4471] [MERGED] Offer Hindi as a documentation language and fix the Language dropdown order #6392

Closed
opened 2026-10-23 04:10:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4471
Author: @kolacheee
Created: 8/2/2026
Status: ✅ Merged
Merged: 8/2/2026
Merged by: @kolacheee

Base: staging ← Head: agent/docs-language-hi


📝 Commits (4)

  • 7d870cf Offer Hindi as a documentation language and fix the Language dropdown order
  • d941305 Reference #4471 in the changelog entries
  • 20dee9e Merge branch 'staging' into agent/docs-language-hi
  • fdb3741 Remove the duplicate Fixed heading introduced by the branch update

📊 Changes

7 files changed (+36 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 CONTRIBUTING.md (+1 -0)
📝 packages/client/src/components/modals/DocsViewerModal.tsx (+22 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+1 -1)
📝 packages/client/src/localization/locale-loader.ts (+5 -1)
📝 packages/shared/src/constants/docs-languages.ts (+1 -0)
📝 scripts/regressions/docs-language.regression.ts (+1 -0)

📄 Description

Why

Hindi is the next language on the documentation-translation roadmap (all UI Language locales get a docs pack; हिन्दी follows Simplified Chinese). Hindi-speaking users currently read all 124 in-app guides in English. This PR makes them available in natural Hindi through the existing Settings → General → Documentation Language selector and the onboarding tutorial's language suggestion.

It also fixes a maintainer-reported UI defect: the Settings → General → Language dropdown appeared in scrambled order.

Follows up on #4100 (selector + architecture + Spanish), #4157, #4191, #4229, #4235, #4281, #4345, #4374, and #4435. The translated pack itself lives on the docs-i18n branch (pushed together with this PR); this Engine PR adds the language wiring and the dropdown fix.

What changed

  • packages/shared/src/constants/docs-languages.ts — hi: { label: "हिन्दी", englishLabel: "Hindi" } (byte-matched to the Language dropdown's Intl.DisplayNames output, NFC).
  • packages/client/src/components/modals/DocsViewerModal.tsx — Hindi sidebar category labels (गाइड, होम, इंस्टॉलेशन, कनेक्शन, कैरेक्टर, चैट, लोरबुक, एजेंट, मीडिया, प्रॉम्प्ट, अपीयरेंस, सेटिंग्स, डेटा, एक्सटेंशन, इंटीग्रेशन, डेवलपमेंट; mode names and Noodle stay English).
  • packages/client/src/components/panels/SettingsPanel.tsx — settings-search aliases hindi, हिन्दी.
  • packages/client/src/localization/locale-loader.ts — the Language-dropdown fix: the previous sort compared native-script labels with a different collation locale per entry, which is non-transitive across scripts — simulation over the twelve real locales produced 2,845 distinct orderings depending on input order, with 240 comparator-consistency violations. The dropdown now sorts by language code with English pinned first (one deterministic order), matching the Documentation Language selector: English, العربية, Deutsch, Español, Français, हिन्दी, 日本語, 한국어, Polski, Português (Brasil), Русский, 简体中文.
  • scripts/regressions/docs-language.regression.ts — asserts Hindi stays offered.
  • CONTRIBUTING.md — Hindi translation-convention bullet (see below).
  • CHANGELOG.md — entries under [Unreleased] Added (the pack) and Fixed (the dropdown).

No server changes are needed per language: the pack list, download URL, verification, and serving all derive from the shared label map.

Hindi conventions (documented in CONTRIBUTING)

Because the in-app docs search is literal substring matching, the pack enforces one spelling and search-safe text end to end:

  • Modern technical Hindi — the Google/Microsoft Hindi register with Devanagari loanwords (फ़ाइल, सर्वर, प्रॉम्प्ट, लोरबुक), never शुद्ध purisms (no संगणक anywhere); आप address with करें-style imperatives, never तू/तुम; reader-gendering verb agreement avoided throughout.
  • One transliteration per term with a fixed nukta policy — nukta kept on ज़/फ़ only (so फ़ाइल but खास), because फ़ाइल and फाइल are different byte strings that split the search index; a nukta-stripped-key detector audited every Devanagari token pack-wide.
  • International digits 0-9 only — Devanagari ०७८६० would never match a search for 7860.
  • The danda (।) ends Hindi sentences uniformly (verbatim English strings keep their own punctuation); straight ASCII quotes; product names stay in Latin script with postpositions as separate words (Marinara Engine में).
  • NFC-normalized with zero ZWJ/ZWNJ — Devanagari's invisible joiners and decomposed nukta forms would silently break substring search.

Validation performed

  • Translation pipeline: 124 files through translate → structural verify (NFC, ZWJ/ZWNJ, Devanagari-numeral and nukta checks, byte-identical code fences, heading/link-target/table parity) → fix → re-verify, then a 620-edit consistency sweep (transliteration splits to zero across 24 pairs, link-text↔H1 from 267 mismatches to 0, heading normalization, mode-name conventions).
  • Four independent native-reader QA panels read all 124 files end-to-end (~200 fixes: meaning inversions like "records until unmuted" vs "while unmuted", 23 question marks restored to FAQ headings, term-split closures), followed by a reconciliation resolving every cross-panel item with recorded rulings (including the sense-split ruling for OS-prompt अनुमति vs Marinara परमिशन).
  • An adversarial engine-diff review verified the change surface by execution — including formally verifying the dropdown comparator (one deterministic order, zero transitivity violations, matching supportedDocLanguages() semantics).
  • node scripts/docs-i18n/validate-pack.mjs passes for all ten packs at 124/124 against current staging; committed git blobs re-hashed against every manifest (0 mismatches).
  • pnpm regression:docs passes (en, de, es, fr, hi, ja, ko, pl, pt-br, ru, zh-hans); pnpm check passes.
  • Runtime-verified on a smoke server with the pack materialized as installed, including Devanagari search checks (प्रॉम्प्ट, कनेक्शन, लोरबुक through the API and viewer, highlight behavior, and NFC-input matching).
  • The companion docs-i18n push also carries a catch-up mirroring two recently-drifted guides into all nine shipped packs, so every language ships current with this Engine PR.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added Hindi documentation support across all in-app guides.
    • Added Hindi sidebar labels and Hindi search support in documentation language settings.
    • Preserved English names for in-app controls within Hindi guides.
  • Improvements
    • Documentation languages now appear in consistent code-based order, with English listed first.
  • Documentation
    • Added Hindi translation guidance covering terminology, formatting, numerals, punctuation, and product naming conventions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4471 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/2/2026 **Status:** ✅ Merged **Merged:** 8/2/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `agent/docs-language-hi` --- ### 📝 Commits (4) - [`7d870cf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7d870cfa501dcc2c7b7c0345cf586e77229bc361) Offer Hindi as a documentation language and fix the Language dropdown order - [`d941305`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d941305403b66648005d230a9a734abe8c43d443) Reference #4471 in the changelog entries - [`20dee9e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20dee9e6085c586ef28588e38f159eb050ba5b16) Merge branch 'staging' into agent/docs-language-hi - [`fdb3741`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fdb3741820dfcfda72c16d18bea8e8c8d7116a9a) Remove the duplicate Fixed heading introduced by the branch update ### 📊 Changes **7 files changed** (+36 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `CONTRIBUTING.md` (+1 -0) 📝 `packages/client/src/components/modals/DocsViewerModal.tsx` (+22 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+1 -1) 📝 `packages/client/src/localization/locale-loader.ts` (+5 -1) 📝 `packages/shared/src/constants/docs-languages.ts` (+1 -0) 📝 `scripts/regressions/docs-language.regression.ts` (+1 -0) </details> ### 📄 Description ## Why Hindi is the next language on the documentation-translation roadmap (all UI `Language` locales get a docs pack; हिन्दी follows Simplified Chinese). Hindi-speaking users currently read all 124 in-app guides in English. This PR makes them available in natural Hindi through the existing **Settings → General → Documentation Language** selector and the onboarding tutorial's language suggestion. It also fixes a maintainer-reported UI defect: the **Settings → General → Language** dropdown appeared in scrambled order. Follows up on #4100 (selector + architecture + Spanish), #4157, #4191, #4229, #4235, #4281, #4345, #4374, and #4435. The translated pack itself lives on the `docs-i18n` branch (pushed together with this PR); this Engine PR adds the language wiring and the dropdown fix. ## What changed - `packages/shared/src/constants/docs-languages.ts` — `hi: { label: "हिन्दी", englishLabel: "Hindi" }` (byte-matched to the **Language** dropdown's `Intl.DisplayNames` output, NFC). - `packages/client/src/components/modals/DocsViewerModal.tsx` — Hindi sidebar category labels (गाइड, होम, इंस्टॉलेशन, कनेक्शन, कैरेक्टर, चैट, लोरबुक, एजेंट, मीडिया, प्रॉम्प्ट, अपीयरेंस, सेटिंग्स, डेटा, एक्सटेंशन, इंटीग्रेशन, डेवलपमेंट; mode names and Noodle stay English). - `packages/client/src/components/panels/SettingsPanel.tsx` — settings-search aliases `hindi`, `हिन्दी`. - `packages/client/src/localization/locale-loader.ts` — **the Language-dropdown fix**: the previous sort compared native-script labels with a *different collation locale per entry*, which is non-transitive across scripts — simulation over the twelve real locales produced 2,845 distinct orderings depending on input order, with 240 comparator-consistency violations. The dropdown now sorts by language code with English pinned first (one deterministic order), matching the Documentation Language selector: English, العربية, Deutsch, Español, Français, हिन्दी, 日本語, 한국어, Polski, Português (Brasil), Русский, 简体中文. - `scripts/regressions/docs-language.regression.ts` — asserts Hindi stays offered. - `CONTRIBUTING.md` — Hindi translation-convention bullet (see below). - `CHANGELOG.md` — entries under `[Unreleased]` Added (the pack) and Fixed (the dropdown). No server changes are needed per language: the pack list, download URL, verification, and serving all derive from the shared label map. ## Hindi conventions (documented in CONTRIBUTING) Because the in-app docs search is literal substring matching, the pack enforces one spelling and search-safe text end to end: - **Modern technical Hindi** — the Google/Microsoft Hindi register with Devanagari loanwords (फ़ाइल, सर्वर, प्रॉम्प्ट, लोरबुक), never शुद्ध purisms (no संगणक anywhere); **आप** address with करें-style imperatives, never तू/तुम; reader-gendering verb agreement avoided throughout. - **One transliteration per term with a fixed nukta policy** — nukta kept on ज़/फ़ only (so फ़ाइल but खास), because फ़ाइल and फाइल are different byte strings that split the search index; a nukta-stripped-key detector audited every Devanagari token pack-wide. - **International digits 0-9 only** — Devanagari ०७८६० would never match a search for `7860`. - **The danda (।) ends Hindi sentences** uniformly (verbatim English strings keep their own punctuation); straight ASCII quotes; product names stay in Latin script with postpositions as separate words (Marinara Engine में). - **NFC-normalized with zero ZWJ/ZWNJ** — Devanagari's invisible joiners and decomposed nukta forms would silently break substring search. ## Validation performed - Translation pipeline: 124 files through translate → structural verify (NFC, ZWJ/ZWNJ, Devanagari-numeral and nukta checks, byte-identical code fences, heading/link-target/table parity) → fix → re-verify, then a 620-edit consistency sweep (transliteration splits to zero across 24 pairs, link-text↔H1 from 267 mismatches to 0, heading normalization, mode-name conventions). - Four independent native-reader QA panels read all 124 files end-to-end (~200 fixes: meaning inversions like "records *until* unmuted" vs "*while* unmuted", 23 question marks restored to FAQ headings, term-split closures), followed by a reconciliation resolving every cross-panel item with recorded rulings (including the sense-split ruling for OS-prompt अनुमति vs Marinara परमिशन). - An adversarial engine-diff review verified the change surface by execution — including formally verifying the dropdown comparator (one deterministic order, zero transitivity violations, matching `supportedDocLanguages()` semantics). - `node scripts/docs-i18n/validate-pack.mjs` passes for all ten packs at 124/124 against current `staging`; committed git blobs re-hashed against every manifest (0 mismatches). - `pnpm regression:docs` passes (`en, de, es, fr, hi, ja, ko, pl, pt-br, ru, zh-hans`); `pnpm check` passes. - Runtime-verified on a smoke server with the pack materialized as installed, including Devanagari search checks (प्रॉम्प्ट, कनेक्शन, लोरबुक through the API and viewer, highlight behavior, and NFC-input matching). - The companion `docs-i18n` push also carries a catch-up mirroring two recently-drifted guides into all nine shipped packs, so every language ships current with this Engine PR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **New Features** * Added Hindi documentation support across all in-app guides. * Added Hindi sidebar labels and Hindi search support in documentation language settings. * Preserved English names for in-app controls within Hindi guides. * **Improvements** * Documentation languages now appear in consistent code-based order, with English listed first. * **Documentation** * Added Hindi translation guidance covering terminology, formatting, numerals, punctuation, and product naming conventions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:10:00 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6392
No description provided.