docs: build the same HTML page set for every language#4192
Conversation
|
@grandixximo Might be rebase to master, so the links are checked? |
Partials (e.g. hal/halscope.adoc) are include::d into a chapter and have no standalone English page, but the per-language target list came from po4a.cfg, which lists them as translation units, so translations rendered them standalone with a switcher link to a non-existent en/ page. Restrict translated targets to the curated English page set.
cd0cffd to
da0b5b7
Compare
|
Fixes 28 links, other will probably have to be tackled separately, sid is being flaky. |
|
Nice, only fragments left and one link: The cross links are indeed broken: https://linuxcnc.org/docs/devel/html/de/getting-started/updating-linuxcnc.html Line 75: Notice I guess this should be a separate PR. It's probably also a translation issue, in the English version, it is fine. |
Hm, it seems that both SID instances hang on the test |
I have a PR canceling to long taking jobs automatically, so no one has to do it manually: It might be a temporary issue in sid or also a real library change. This can be investigated in a docker or VM. I would just wait a few days to see if it fixes itself... ;-) |
Problem
include::d partials (hal/halscope,hal/halshow,help/rtfaults,help/tklinuxcnc) have no standalone English page: their content renders inside the chapter that includes them. The translated build, though, rendered them as standalone pages (de/hal/halscope.htmland so on), because the per-language HTML target list is derived frompo4a.cfg, which lists partials as translation units.Each such translated page then carried a language switcher linking to
en/hal/halscope.html, which does not exist.lang_switcher_postprocess.pygreyed the entry but kept the deadhref, so it still 404s. This is the bulk of the broken cross-language links an HTML link checker reports in the translated trees.Fix
Restrict the per-language HTML targets to the same curated page set English builds (
DOC_HTML_PAGE_STEMS, fromDOC_SRCS_EN). Partials are no longer rendered standalone in any language; their text is still translated and inlined into the translated chapters, andxref_resolver.rbalready redirects partial anchors to the including page.Verification
Full 7-language doc build (
de es fr nb ru uk zh_CN):dewas 136 before, the 4 extras being the partials).en/...pages anywhere in the output.halscopeinde/hal/tutorial.html).