aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorVegard Nossum <[email protected]>2023-12-15 13:37:01 +0100
committerJonathan Corbet <[email protected]>2023-12-19 14:34:59 -0700
commit7418ec5b151f5591f750d57705cbb633c084a434 (patch)
treeb71cbd2cafa0603546979d7cf205423dea8f3a51 /tools/perf/scripts/python/export-to-postgresql.py
parentdcd39fa2be95efd5cbce74661151f68510cb67fe (diff)
docs: translations: add translations links when they exist
Add a new Sphinx extension that knows about the translations of kernel documentation and can insert links to the translations at the top of the document. It basically works like this: 1. Register a new node type, LanguagesNode. 2. Register a new transform, TranslationsTransform, that inserts a new LanguageNode at the top of every document. The LanguageNode contains "pending references" to translations of the document. The key here is that these are pending (i.e. unresolved) references that may or may not actually exist. 3. Register a 'doctree-resolved' event that iterates over all the LanguageNode nodes. Any unresolved references are filtered out; the list of resolved references is passed to the 'translations.html' template and rendered as an HTML node (if HTML output is selected). Testing: make htmldocs, make latexdocs with Sphinx v4.3.2 and Firefox. v2: - changed bar into a drop-down menu - fixed language labels - fixed hysteresis reported by Akira Yokosawa Cc: Federico Vaga <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Akira Yokosawa <[email protected]> Cc: Yanteng Si <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions