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:
shimizukawa
2015-02-28 00:20:40 +09:00
parent 1c6dcd8842
commit e296bdc849
2 changed files with 9 additions and 3 deletions

View File

@@ -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)
=====================================

View File

@@ -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'):