summaryrefslogtreecommitdiff
path: root/sphinx/builders/gettext.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-03-02 14:40:29 +0900
committershimizukawa <shimizukawa@gmail.com>2014-03-02 14:40:29 +0900
commitb54223092352fa9047dc58545a52da08090f7cf2 (patch)
treef43551114ead1933b6ba49fb04016d39c5cfd7c1 /sphinx/builders/gettext.py
parent78fc8d4b801a493e4980552106dd0dc3d16f75cf (diff)
downloadsphinx-b54223092352fa9047dc58545a52da08090f7cf2.tar.gz
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.
Diffstat (limited to 'sphinx/builders/gettext.py')
-rw-r--r--sphinx/builders/gettext.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py
index fb8bd0cc..bf43f9b4 100644
--- a/sphinx/builders/gettext.py
+++ b/sphinx/builders/gettext.py
@@ -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] = []