[PR #4229] [MERGED] Add the Brazilian Portuguese documentation language pack #6291

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4229
Author: @kolacheee
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/docs-language-pt-br


📝 Commits (5)

  • 2223526 Offer Brazilian Portuguese as a documentation language
  • 5b54d6b Merge remote-tracking branch 'origin/staging' into agent/docs-language-pt-br
  • 7c41ec2 Reference #4229 in the changelog entry
  • 54cabd8 Merge branch 'staging' into agent/docs-language-pt-br
  • 4627d73 Merge branch 'staging' into agent/docs-language-pt-br

📊 Changes

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

View changed files

📝 CHANGELOG.md (+2 -0)
📝 CONTRIBUTING.md (+1 -0)
📝 packages/client/src/components/modals/DocsViewerModal.tsx (+22 -0)
📝 packages/client/src/components/onboarding/OnboardingTutorial.tsx (+8 -4)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+1 -1)
📝 packages/shared/src/constants/docs-languages.ts (+1 -0)
📝 scripts/regressions/docs-language.regression.ts (+1 -0)

📄 Description

Why

Language #5 of the plan to cover every interface language with a documentation pack, following Spanish (#4100), German (#4157), and French (#4191). The pack code is pt-br with the label Português (Brasil), matching the interface-language convention. Content lives on the companion docs-i18n branch (pt-br/ + sha256 manifest) and downloads on demand — zero checkout or image weight.

There is no linked issue/feature request yet — one should be opened and linked before this PR is submitted.

What changed

  • packages/shared/src/constants/docs-languages.ts: "pt-br": { label: "Português (Brasil)", englishLabel: "Brazilian Portuguese" }.
  • packages/client/src/components/onboarding/OnboardingTutorial.tsx: first region-suffixed pack code exposed a real gap — the tutorial's language suggestion stripped pt-BR to pt and would never propose the pack. It now matches the full lowercased locale first (pt-BR → pt-br), then falls back to a base-language match (a hypothetical pt-PT interface would still find pt-br).
  • packages/client/src/components/modals/DocsViewerModal.tsx: Portuguese sidebar category labels (Guias, Início, Conexões, Personagens, Configurações, …; mode names Conversation/Roleplay/Game Mode stay English to match the UI).
  • packages/client/src/components/panels/SettingsPanel.tsx: settings-search aliases "portuguese", "português", "brazilian".
  • scripts/regressions/docs-language.regression.ts: pt-br assertion (and the existing supported-but-uninstalled fixture test now exercises the real region-suffixed code path).
  • CONTRIBUTING.md: Brazilian Portuguese per-language conventions; CHANGELOG.md: Unreleased entry.
  • Companion (on docs-i18n, not part of this diff): pt-br/** — all 123 guides with a generated manifest.

Translation approach

Same naturalness-first method as German and French: a glossary/style brief with an explicit anti-calque table, consistent você with its imperative ("Clique", "Abra") — matching the informal-register precedent (tú/du/tu) and Brazilian consumer-software convention — deliberately Brazilian vocabulary with European forms banned (arquivo/salvar/tela/usuário, never ficheiro/guardar/ecrã/utilizador), current Acordo Ortográfico spelling, community loanwords with genders (o prompt, o token, o lorebook; NPC stays NPC per Brazilian gaming usage), false-friend guardrails (livraria/biblioteca, atualmente, eventualmente), and UI control names kept in English bold with a one-time Portuguese gloss. The sweep now also includes the cross-link-text audit institutionalized after the French pack (link text unified to each target's actual H1 for the most-linked guides). Every file passed structural verification, dialect/address-form/terminology sweeps, and an independent language-QA panel.

Validation done

  • pnpm check and pnpm regression:docs green (regression reports en, de, es, fr, pt-br).
  • scripts/docs-i18n/validate-pack.mjs + build-manifest.mjs green on pt-br/.
  • Runtime-verified against a throwaway data dir with a materialized pack: viewer fully Portuguese (categories, titles, search), Settings coverage counts, switch flows.

Summary by CodeRabbit

  • New Features

    • Added Brazilian Portuguese documentation support, including localized guide categories and labels.
    • Brazilian Portuguese is now available in documentation language settings and onboarding suggestions.
    • Expanded search terms for finding the documentation language setting.
  • Documentation

    • Added Brazilian Portuguese localization guidelines and changelog information.

🔄 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/4229 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/docs-language-pt-br` --- ### 📝 Commits (5) - [`2223526`](https://github.com/Pasta-Devs/Marinara-Engine/commit/222352678e9aa013e8154dc552048524f0df168c) Offer Brazilian Portuguese as a documentation language - [`5b54d6b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b54d6b9a834eb9ab113e4ddb733636d3114219f) Merge remote-tracking branch 'origin/staging' into agent/docs-language-pt-br - [`7c41ec2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7c41ec24615dc476557c800f7400427874ebb366) Reference #4229 in the changelog entry - [`54cabd8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/54cabd8d85adac2a6b37d1c4f71ae37920e9d0b6) Merge branch 'staging' into agent/docs-language-pt-br - [`4627d73`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4627d7355f2e34b01ff2208fd8dac64c6d9ff1ab) Merge branch 'staging' into agent/docs-language-pt-br ### 📊 Changes **7 files changed** (+36 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `CONTRIBUTING.md` (+1 -0) 📝 `packages/client/src/components/modals/DocsViewerModal.tsx` (+22 -0) 📝 `packages/client/src/components/onboarding/OnboardingTutorial.tsx` (+8 -4) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+1 -1) 📝 `packages/shared/src/constants/docs-languages.ts` (+1 -0) 📝 `scripts/regressions/docs-language.regression.ts` (+1 -0) </details> ### 📄 Description ## Why Language #5 of the plan to cover every interface language with a documentation pack, following Spanish (#4100), German (#4157), and French (#4191). The pack code is `pt-br` with the label **Português (Brasil)**, matching the interface-language convention. Content lives on the companion `docs-i18n` branch (`pt-br/` + sha256 manifest) and downloads on demand — zero checkout or image weight. There is no linked issue/feature request yet — one should be opened and linked before this PR is submitted. ## What changed - `packages/shared/src/constants/docs-languages.ts`: `"pt-br": { label: "Português (Brasil)", englishLabel: "Brazilian Portuguese" }`. - `packages/client/src/components/onboarding/OnboardingTutorial.tsx`: **first region-suffixed pack code exposed a real gap** — the tutorial's language suggestion stripped `pt-BR` to `pt` and would never propose the pack. It now matches the full lowercased locale first (`pt-BR` → `pt-br`), then falls back to a base-language match (a hypothetical `pt-PT` interface would still find `pt-br`). - `packages/client/src/components/modals/DocsViewerModal.tsx`: Portuguese sidebar category labels (`Guias`, `Início`, `Conexões`, `Personagens`, `Configurações`, …; mode names **Conversation**/**Roleplay**/**Game Mode** stay English to match the UI). - `packages/client/src/components/panels/SettingsPanel.tsx`: settings-search aliases `"portuguese"`, `"português"`, `"brazilian"`. - `scripts/regressions/docs-language.regression.ts`: pt-br assertion (and the existing supported-but-uninstalled fixture test now exercises the real region-suffixed code path). - `CONTRIBUTING.md`: Brazilian Portuguese per-language conventions; `CHANGELOG.md`: Unreleased entry. - Companion (on `docs-i18n`, not part of this diff): `pt-br/**` — all 123 guides with a generated manifest. ## Translation approach Same naturalness-first method as German and French: a glossary/style brief with an explicit anti-calque table, consistent **você** with its imperative ("Clique", "Abra") — matching the informal-register precedent (tú/du/tu) and Brazilian consumer-software convention — deliberately Brazilian vocabulary with European forms banned (arquivo/salvar/tela/usuário, never ficheiro/guardar/ecrã/utilizador), current Acordo Ortográfico spelling, community loanwords with genders (o prompt, o token, o lorebook; NPC stays NPC per Brazilian gaming usage), false-friend guardrails (livraria/biblioteca, atualmente, eventualmente), and UI control names kept in English bold with a one-time Portuguese gloss. The sweep now also includes the cross-link-text audit institutionalized after the French pack (link text unified to each target's actual H1 for the most-linked guides). Every file passed structural verification, dialect/address-form/terminology sweeps, and an independent language-QA panel. ## Validation done - `pnpm check` and `pnpm regression:docs` green (regression reports `en, de, es, fr, pt-br`). - `scripts/docs-i18n/validate-pack.mjs` + `build-manifest.mjs` green on `pt-br/`. - Runtime-verified against a throwaway data dir with a materialized pack: viewer fully Portuguese (categories, titles, search), Settings coverage counts, switch flows. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Brazilian Portuguese documentation support, including localized guide categories and labels. * Brazilian Portuguese is now available in documentation language settings and onboarding suggestions. * Expanded search terms for finding the documentation language setting. * **Documentation** * Added Brazilian Portuguese localization guidelines and changelog information. <!-- 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:09:01 +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#6291
No description provided.