mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The change c773692
breaks a previous gettext output that contains duplicated msgid such as "foo bar" and "version changes in 1.3: foo bar".
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -16,6 +16,12 @@ Features added
|
||||
* The :confval:`source_suffix` config value can now be a list of multiple
|
||||
suffixes.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* 1.3b3 change breaks a previous gettext output that contains duplicated
|
||||
msgid such as "foo bar" and "version changes in 1.3: foo bar".
|
||||
|
||||
|
||||
Release 1.3b3 (released Feb 24, 2015)
|
||||
=====================================
|
||||
|
@@ -63,9 +63,7 @@ def apply_source_workaround(node):
|
||||
))):
|
||||
node.source = find_source_node(node)
|
||||
node.line = 0 # need fix docutils to get `node.line`
|
||||
|
||||
if not node.rawsource:
|
||||
node.rawsource = node.astext()
|
||||
return
|
||||
|
||||
|
||||
IGNORED_NODES = (
|
||||
@@ -108,6 +106,8 @@ def extract_messages(doctree):
|
||||
for node in doctree.traverse(is_translatable):
|
||||
if isinstance(node, LITERAL_TYPE_NODES):
|
||||
msg = node.rawsource
|
||||
if not msg:
|
||||
msg = node.astext()
|
||||
elif isinstance(node, IMAGE_TYPE_NODES):
|
||||
msg = '.. image:: %s' % node['uri']
|
||||
if node.get('alt'):
|
||||
|
Reference in New Issue
Block a user