Extract translatable strings alongside their doctree nodes.

This commit is contained in:
Robert Lehmann committed 2010-06-16 20:27:27 +02:00
1 parent 0109af80b5
commit cd07472676
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ class MessageCatalogBuilder(Builder):
otherwise its *name* -- is considered its section.
"""
catalog = self.catalogs[docname.split('/')[0]]
for msg in extract_messages(doctree):
for _, msg in extract_messages(doctree):
# XXX msgctxt for duplicate messages
if msg not in catalog:
catalog.append(msg)
+1 -1
View File
@@ -30,7 +30,7 @@ def extract_messages(doctree):
msg = node.astext().replace('\n', ' ').strip()
# XXX nodes rendering empty are likely a bug in sphinx.addnodes
if msg:
yield msg
yield node, msg
def nested_parse_with_titles(state, content, node):