Skip to content

docs: add full Norwegian Bokmål (nb) locale support#357

Merged
rhuanbarreto merged 1 commit into
mainfrom
claude/laughing-rubin-038275
May 28, 2026
Merged

docs: add full Norwegian Bokmål (nb) locale support#357
rhuanbarreto merged 1 commit into
mainfrom
claude/laughing-rubin-038275

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Add Norwegian Bokmål (nb) as a third documentation locale alongside English (root) and Brazilian Portuguese (pt-BR)
  • Translate all 56 English documentation pages into Norwegian Bokmål
  • Update Astro/Starlight configuration, SEO metadata, and ADR governance for the new locale

Changes

Infrastructure (5 files modified)

  • docs/astro.config.mjs — Register nb locale, add sidebar group translations for all 7 sections (both pt-BR and nb), add og:locale:alternate for nb_NO, update JSON-LD inLanguage to include "nb"
  • docs/src/components/HeadSEO.astro — Refactor hardcoded en/pt-BR hreflang logic to a config-driven multi-locale array, making future locale additions trivial
  • docs/scripts/generate-llms-full.ts — Exclude nb/ directory from English-only llms-full.txt output using path separator-aware filtering
  • .archgate/adrs/GEN-002-docs-i18n.rules.ts — Add "nb" to LOCALES constant for automated i18n parity checks
  • .archgate/adrs/GEN-002-docs-i18n.md — Add Norwegian Bokmål to the configured locales table, add Bokmål-specific translation Do's, update consequences for 3-locale context

Content (56 new files)

All pages under docs/src/content/docs/nb/ mirroring the English site:

Section Files
Getting Started 2 (installation, quick-start)
Concepts 3 (adrs, rules, domains)
Guides 11 (writing-adrs, writing-rules, ci-integration, claude-code-plugin, vscode-plugin, copilot-cli-plugin, cursor-integration, opencode-integration, importing-adrs, pre-commit-hooks, security)
Reference 17 (CLI commands overview + 11 subcommands, rule-api, adr-schema, configuration, telemetry, privacy-policy)
Examples 21 rule example pages
Studies 1 (sentry case study)
Index 1 (splash page)

Translation conventions

  • Titles, descriptions, prose, headings, card text, and admonition labels translated to Norwegian Bokmål
  • Code blocks, CLI commands, file paths, imports, href values, and technical terms kept in English
  • Informal "du" form used throughout
  • Starlight's built-in nb.json UI translations used (no custom i18n file needed)

Test plan

  • bun run build in docs/ — 169 pages built, 0 errors
  • bun run validate — lint, typecheck, format, tests all pass; 27/27 ADR rules pass
  • hreflang tags verified: en, pt-BR, nb, x-default all present
  • Sidebar group labels render in Norwegian on /nb/ pages
  • Language switcher shows "Norsk (Bokmål)"
  • llms-full.txt contains no Norwegian content
  • JSON-LD inLanguage includes "nb", og:locale:alternate includes nb_NO
  • No locale-prefixed internal links (no-locale-prefix-in-links rule passes)
  • 1:1 page parity with English (i18n-page-parity rule passes)

Note: The knip step in bun run validate fails with pre-existing false positives (oxlint, oxfmt, czg, conventional-changelog reported as unused devDeps). Verified identical on clean main — not introduced by this PR.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 28, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: f09d8d6
Status: ✅  Deploy successful!
Preview URL: https://f5db856f.archgate-cli.pages.dev
Branch Preview URL: https://claude-laughing-rubin-038275.archgate-cli.pages.dev

View logs

Add Norwegian Bokmål as a third locale alongside English and pt-BR,
covering all 56 documentation pages with translated content.

Infrastructure changes:
- Register nb locale in astro.config.mjs with sidebar group translations
- Refactor HeadSEO.astro hreflang logic from hardcoded en/pt-BR to
  config-driven multi-locale array
- Update generate-llms-full.ts to exclude nb/ from English-only output
- Add og:locale:alternate for nb_NO and update JSON-LD inLanguage

Governance updates:
- Add "nb" to LOCALES in GEN-002-docs-i18n.rules.ts
- Update GEN-002 ADR with Norwegian locale entry and Bokmål-specific
  translation guidelines

Content: 56 new .mdx files under docs/src/content/docs/nb/ mirroring
the full English site structure (getting-started, concepts, guides,
reference, examples, studies).

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@rhuanbarreto rhuanbarreto force-pushed the claude/laughing-rubin-038275 branch from 6d86af3 to f09d8d6 Compare May 28, 2026 20:17
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Metric Value
Lines 90.0% (6550 / 7278)
Threshold 90% minimum — met
Platforms Linux + Windows

Full HTML report available in workflow artifacts.

Per-directory breakdown
Directory Coverage Lines
src/commands/ 88.1% 2069 / 2348
src/engine/ 93.1% 1207 / 1297
src/formats/ 100.0% 141 / 141
src/helpers/ 89.7% 3133 / 3492

@rhuanbarreto rhuanbarreto merged commit fa7065b into main May 28, 2026
14 checks passed
@rhuanbarreto rhuanbarreto deleted the claude/laughing-rubin-038275 branch May 28, 2026 20:26
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.

1 participant