docs: German translation of the core guides, plus multilingual plumbing - #15627
Open
devGregA wants to merge 1 commit into
Open
docs: German translation of the core guides, plus multilingual plumbing#15627devGregA wants to merge 1 commit into
devGregA wants to merge 1 commit into
Conversation
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Adds a German locale to the documentation site and the theme plumbing a second language needs. Content: 246 German pages covering the core guides (get started, import data, triage, asset modelling, metrics, issue tracking, admin, automation, connectors, federal compliance, sensei, help, navigation). Changelogs and the supported_tools parser reference are out of scope for this pass. Pages use the filename-suffix layout (page.de.md) so the English tree stays where it is and open pull requests keep applying. Theme: about 60 hardcoded English strings in the layouts move to i18n lookups (navigation, homepage cards, hero, footer, aria labels), with i18n/en.toml and i18n/de.toml holding them and a per-language menu file for the sidebar. Two bugs surfaced while wiring this up and are fixed here: baseof.html emitted a fixed lang attribute and no dir attribute, and the header active-state check matched every navigation item once URLs carried a language prefix. Navigation entries for untranslated sections point at the English pages so nothing 404s. TRANSLATIONS.md documents the layout, the scope, how to add a language, and the quarterly refresh. These are machine translations checked for structural integrity, not reviewed for meaning. A native-speaker pass is recommended before treating the German pages as authoritative. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
devGregA
force-pushed
the
devgrega/docs-i18n
branch
from
August 12, 2026 05:02
491481b to
ae50ceb
Compare
Contributor
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Translates the 246 core guide pages (~257,000 words) into German, and adds the multilingual plumbing that every further language reuses. German is one language on purpose: it proves the whole pipeline end to end so the rest is repetition, not risk.
Layout choice
Translations sit beside their English source as
<page>.de.md, not under a per-languagecontentDir. ThecontentDirapproach would require moving every English page intocontent/en/, which breaks existing tooling and every open docs PR. English URLs are untouched:defaultContentLanguageInSubdirstaysfalse, so English pages keep serving from the site root and German lands under/de/. Each translated page keeps the Englishslug,weight,aliases, andaudience, so URLs, ordering, and the Open Source / Pro toggle behave identically in German.Site chrome was the hidden half of this
The templates hardcoded their English text, so translating page bodies alone would have produced a German page with an English homepage, navigation, and footer. About sixty strings are now
i18nlookups: nav labels, the homepage cards, the whole footer, the hero subtitle, and eleven screen-reader labels. Their terminology comes from the product UI catalogs (dojo/locale/<lang>/), so a severity or status word reads the same in the docs as it does in DefectDojo.Two theme bugs fixed on the way
baseof.htmlnow emits per-languagelanganddir. The theme hardcoded the site-level language code and never emitteddirat all, so Arabic, Hebrew, Persian, and Urdu would have rendered left-to-right no matter how good the translation was.Scope
Translated:
get_started(42),asset_modelling(41),admin(40),triage_findings(30),metrics_reports(21),automation(16),connectors(16),import_data(15),sensei(7),federal_compliance(7),navigation(6),help(3),issue_tracking(1), home.Left English on purpose:
releases/changelogs (they churn with every release, and a stale translated changelog is worse than an English one) andsupported_tools/(219 pages of tables, scanner names, and CVE identifiers that are the same in any language). Nav entries for those sections point at the English URL, so nothing in a translated nav 404s.Verification
.de.mdfiles, four new i18n/menu/docs files, and seven template or config edits).{{<or{{%leakage in the rendered HTML (a broken shortcode renders literally, so this is the real test).A gate bug worth mentioning
Two long pages kept failing the fence gate on content that turned out to be correct. The gate paired code-fence markers with a regex anchored at column 0, so an indented or blockquoted opening fence (
```yaml,> ```yaml) was skipped and that block's closing fence was mistaken for an opening one, which swallowed the following prose as "code" and hid its headings from the heading check. The gate now walks lines the way a markdown parser does. It is stricter than before, not looser: on one page it went from seeing 89 fenced blocks to all 98, and it now catches corruption inside blockquoted code that previously passed silently. Re-verified against eight deliberate mutations (translated code line, dropped fence, lost indentation, truncated body, demoted heading, rewritten URL) - all flagged, clean translations still pass.Process
TRANSLATIONS.mddocuments the layout, what is and is not translated, how to add a language, and a quarterly refresh cadence. The refresh is incremental:--changed-since <ref>exports only pages whose English source moved, and any page whose English text is byte-identical carries its existing translation forward for free. That path is already proven here: this branch was resynced onto currentbugfixmid-flight, and 64 of the 246 pages reused their earlier translation because their English had not changed.Honest caveats
languages.tomlonly when its content lands, so the switcher never offers an empty language.Trust CenterandStatusfooter links from docs: link the Trust Center and Status page from the footer #15613 are not in this branch; whichever PR lands second should make those two labels i18n lookups as well.PRO__tagging_objects copy.md. It isdraft: falseand therefore live, so it is translated like any other page, but the filename looks accidental and is worth a separate cleanup.🤖 Generated with Claude Code