mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix 'make gettext' fails when the '.. todolist::' directive is present. Closes #1364
Nodes that are replicated like todo don't have a uid, however i18n also unnecessary. If extensions need to choose i18n for the extended nodes or not, we need another approach.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -20,6 +20,7 @@ Bugs fixed
|
||||
* #1386: Fix bug preventing more than one theme being added by the entry point
|
||||
mechanism.
|
||||
* #1370: Ignore "toctree" nodes in text writer, instead of raising.
|
||||
* #1364: Fix 'make gettext' fails when the '.. todolist::' directive is present.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
@@ -55,6 +55,9 @@ class Catalog(object):
|
||||
self.metadata = {} # msgid -> file, line, uid
|
||||
|
||||
def add(self, msg, origin):
|
||||
if not hasattr(origin, 'uid'):
|
||||
# Nodes that are replicated like todo don't have a uid, however i18n is also unnecessary.
|
||||
return
|
||||
if msg not in self.metadata: # faster lookup in hash
|
||||
self.messages.append(msg)
|
||||
self.metadata[msg] = []
|
||||
|
||||
Reference in New Issue
Block a user