mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
Merge branch 'docs-fixes' into docs-mw
Bring in the build fixes so that we can successfully build PDFs again.
This commit is contained in:
commit
32ed793030
@ -388,6 +388,12 @@ latex_elements = {
|
||||
verbatimhintsturnover=false,
|
||||
''',
|
||||
|
||||
#
|
||||
# Some of our authors are fond of deep nesting; tell latex to
|
||||
# cope.
|
||||
#
|
||||
'maxlistdepth': '10',
|
||||
|
||||
# For CJK One-half spacing, need to be in front of hyperref
|
||||
'extrapackages': r'\usepackage{setspace}',
|
||||
|
||||
|
@ -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,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user