aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sphinx
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2024-02-21 13:46:25 -0700
committerJonathan Corbet <corbet@lwn.net>2024-02-21 13:46:25 -0700
commit32ed7930304ca7600a54c2e702098bd2ce7086af (patch)
tree425656b1241abbf34758f8a5a63f11be2a015507 /Documentation/sphinx
parent9ee367809c677428eff6913aa22389aa4a602872 (diff)
parentb7b2ffc3ca59b06397550f96febe95f3f153eb1e (diff)
downloadlinux-32ed7930304ca7600a54c2e702098bd2ce7086af.tar.gz
Merge branch 'docs-fixes' into docs-mw
Bring in the build fixes so that we can successfully build PDFs again.
Diffstat (limited to 'Documentation/sphinx')
-rw-r--r--Documentation/sphinx/translations.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Documentation/sphinx/translations.py b/Documentation/sphinx/translations.py
index 47161e6eba9976..32c2b32b2b5ee9 100644
--- a/Documentation/sphinx/translations.py
+++ b/Documentation/sphinx/translations.py
@@ -29,10 +29,7 @@ all_languages = {
}
class LanguagesNode(nodes.Element):
- def __init__(self, current_language, *args, **kwargs):
- super().__init__(*args, **kwargs)
-
- self.current_language = current_language
+ pass
class TranslationsTransform(Transform):
default_priority = 900
@@ -49,7 +46,8 @@ class TranslationsTransform(Transform):
# normalize docname to be the untranslated one
docname = os.path.join(*components[2:])
- new_nodes = LanguagesNode(all_languages[this_lang_code])
+ new_nodes = LanguagesNode()
+ new_nodes['current_language'] = all_languages[this_lang_code]
for lang_code, lang_name in all_languages.items():
if lang_code == this_lang_code:
@@ -84,7 +82,7 @@ def process_languages(app, doctree, docname):
html_content = app.builder.templates.render('translations.html',
context={
- 'current_language': node.current_language,
+ 'current_language': node['current_language'],
'languages': languages,
})