Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
32ed7930
Commit
32ed7930
authored
Feb 21, 2024
by
Jonathan Corbet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'docs-fixes' into docs-mw
Bring in the build fixes so that we can successfully build PDFs again.
parents
9ee36780
b7b2ffc3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
Documentation/conf.py
Documentation/conf.py
+6
-0
Documentation/sphinx/translations.py
Documentation/sphinx/translations.py
+4
-6
No files found.
Documentation/conf.py
View file @
32ed7930
...
...
@@ -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'\
usep
ackage{setspace}'
,
...
...
Documentation/sphinx/translations.py
View file @
32ed7930
...
...
@@ -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
,
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment