mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
refs #3093: gettext build broken on substituted images.
This commit is contained in:
@@ -11,6 +11,7 @@ Bugs fixed
|
||||
* #3074: ``add_source_parser()`` crashes in debug mode
|
||||
* #3135: ``sphinx.ext.autodoc`` crashes with plain Callable
|
||||
* #3150: Fix query word splitter in JavaScript. It behaves as same as Python's regular expression.
|
||||
* #3093: gettext build broken on substituted images.
|
||||
|
||||
Release 1.4.8 (released Oct 1, 2016)
|
||||
====================================
|
||||
|
||||
@@ -166,7 +166,7 @@ class ApplySourceWorkaround(Transform):
|
||||
|
||||
def apply(self):
|
||||
for n in self.document.traverse():
|
||||
if isinstance(n, nodes.TextElement):
|
||||
if isinstance(n, (nodes.TextElement, nodes.image)):
|
||||
apply_source_workaround(n)
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ class ExtraTranslatableNodes(Transform):
|
||||
"""
|
||||
make nodes translatable
|
||||
"""
|
||||
default_priority = 10
|
||||
default_priority = 9
|
||||
|
||||
def apply(self):
|
||||
targets = self.document.settings.env.config.gettext_additional_targets
|
||||
|
||||
@@ -46,6 +46,8 @@ def apply_source_workaround(node):
|
||||
node.source = definition_list_item.source
|
||||
node.line = definition_list_item.line - 1
|
||||
node.rawsource = node.astext() # set 'classifier1' (or 'classifier2')
|
||||
if isinstance(node, nodes.image) and node.source is None:
|
||||
node.source, node.line = node.parent.source, node.parent.line
|
||||
if isinstance(node, nodes.term):
|
||||
# strip classifier from rawsource of term
|
||||
for classifier in reversed(node.parent.traverse(nodes.classifier)):
|
||||
|
||||
Reference in New Issue
Block a user