docs: German translation of the core guides, plus multilingual plumbing - #15627
Merged
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. |
The German menu was generated from an older copy of menus.en.toml, so two of its tabs pointed at pages that no longer exist and two tabs added upstream were missing entirely. Because the menu renders on every page, the two dead URLs became several hundred link-checker errors in CI. Fixed against the current English menu: Model Your Assets now points at the Assets page rather than a removed Organizations page, the top-level Issue Tracking tab is gone (it is part of Connectors upstream), and the Connectors and Sensei tabs are present. Added the Sensei chapter sidebar, which uses pageRef so it resolves to the German pages by itself. Hugo does not merge menus across languages and does not validate menu URLs, so a per-language menu is an independent hand-maintained list that nothing in the build checks. Verified here by resolving every menu URL against the built site and by extracting every internal link from all 291 built German pages: zero unresolved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A translated page inherits the English page's aliases verbatim, and Hugo treats a root-absolute alias literally. Both language versions then claim the same path, one silently loses, and no language-prefixed alias page is ever written. Relative links inside translated bodies do resolve to the prefixed path, so every link that goes through an alias returned a 404 in German while working in English. The Hugo build reports nothing; only the link checker sees it. Aliases on translated pages are now prefixed with the language, so the German pages serve their own alias paths. 130 aliases across 148 pages. Verified on a clean build with public/ removed first, since hugo leaves stale files behind and those made the broken link resolve locally: every internal link on all 1,121 built pages now resolves, and every menu URL in both languages resolves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three more languages on the plumbing added for German, each covering the same 246 core guide pages. Every page passed the integrity gates before being written: code fences byte-identical to the English source, shortcodes and link targets preserved, heading structure unchanged, and the frontmatter whitelist enforced. Each language ships its content, its i18n strings, and its own menu file. The menu files are generated from the current menus.en.toml, so all four languages carry the same set of tabs, and a tab whose page is not translated points at the English URL rather than a missing page. Verified on a clean build: 733 English pages plus 355 per language, no shortcode leakage in any rendered page, every menu URL resolves in all five languages, and every internal link across all 2,261 built pages resolves. No page is identical to its English source; Japanese shows the expected script coverage. These are machine translations checked for structural integrity, not reviewed for meaning. A native-speaker pass is recommended before treating any of them as authoritative. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
devGregA
enabled auto-merge
August 12, 2026 22:46
blakeaowens
approved these changes
Aug 14, 2026
Maffooch
approved these changes
Aug 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Aug 14, 2026
Resolve the footer.html conflict: DefectDojo#15613 added Trust Center and Status links to the Company column while this branch converted the footer to i18n lookups. Keep the i18n conversion and add both new links as i18n lookups, reusing the footer_link_trust_center and footer_link_status keys this branch already ships in all five locale files.
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