Fix #3253: In Py2 environment, building another locale with a non-captioned toctree produces None captions

This commit is contained in:
shimizukawa committed 2016-12-17 15:39:06 +09:00
1 parent 1ccfb9736b
commit 93dacedfed
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -11,6 +11,8 @@ Bugs fixed
----------
* #3246: xapian search adapter crashes
* #3253: In Py2 environment, building another locale with a non-captioned
toctree produces `None` captions
Release 1.5.1 (released Dec 13, 2016)
=====================================
+1 -1
View File
@@ -49,7 +49,7 @@ class toctree(nodes.General, nodes.Element, translatable):
"""Node for inserting a "TOC tree"."""
def preserve_original_messages(self):
if 'caption' in self:
if self.get('caption'):
self['rawcaption'] = self['caption']
def apply_translated_message(self, original_message, translated_message):