Skip to content

Commit f30a46a

Browse files
committed
sphinx: Fix running against newer sphinx versions
Seems like they renamed l_ to __. Just import the original function and define the shortcut ourselves to avoid issues.
1 parent e7b28e3 commit f30a46a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sphinx/extensions/texdomain.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111
import re
1212
from sphinx import addnodes
1313
from sphinx.domains import Domain, ObjType
14-
from sphinx.locale import l_, _
14+
from sphinx.locale import get_translation
1515
from sphinx.directives import ObjectDescription
1616
from sphinx.roles import XRefRole
1717
from sphinx.util.nodes import make_refnode
1818
from sphinx.util.docfields import Field, GroupedField, TypedField
1919
from docutils import nodes
2020

21+
# Copied from sphinx.locale, and changed back __ to l_
22+
_ = get_translation('sphinx')
23+
l_ = get_translation('sphinx', 'console')
2124

2225
class desc_texenvcontent(nodes.Part, nodes.TextElement):
2326
"""Node for a general parameter list."""

0 commit comments

Comments
 (0)