mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1329: Fix traceback with empty translation msgstr in .po files.
This commit is contained in:
parent
97b3ac0187
commit
1762a22bd8
2
CHANGES
2
CHANGES
@ -109,6 +109,8 @@ Bugs fixed
|
|||||||
|
|
||||||
* #1316: Remove hard-coded ``font-face`` resources from epub theme.
|
* #1316: Remove hard-coded ``font-face`` resources from epub theme.
|
||||||
|
|
||||||
|
* #1329: Fix traceback with empty translation msgstr in .po files.
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -196,7 +196,10 @@ class Locale(Transform):
|
|||||||
patch = new_document(source, settings)
|
patch = new_document(source, settings)
|
||||||
CustomLocaleReporter(node.source, node.line).set_reporter(patch)
|
CustomLocaleReporter(node.source, node.line).set_reporter(patch)
|
||||||
parser.parse(msgstr, patch)
|
parser.parse(msgstr, patch)
|
||||||
patch = patch[0]
|
try:
|
||||||
|
patch = patch[0]
|
||||||
|
except IndexError: # empty node
|
||||||
|
pass
|
||||||
# XXX doctest and other block markup
|
# XXX doctest and other block markup
|
||||||
if not isinstance(patch, nodes.paragraph):
|
if not isinstance(patch, nodes.paragraph):
|
||||||
continue # skip for now
|
continue # skip for now
|
||||||
@ -299,7 +302,10 @@ class Locale(Transform):
|
|||||||
patch = new_document(source, settings)
|
patch = new_document(source, settings)
|
||||||
CustomLocaleReporter(node.source, node.line).set_reporter(patch)
|
CustomLocaleReporter(node.source, node.line).set_reporter(patch)
|
||||||
parser.parse(msgstr, patch)
|
parser.parse(msgstr, patch)
|
||||||
patch = patch[0]
|
try:
|
||||||
|
patch = patch[0]
|
||||||
|
except IndexError: # empty node
|
||||||
|
pass
|
||||||
# XXX doctest and other block markup
|
# XXX doctest and other block markup
|
||||||
if not isinstance(patch, nodes.paragraph):
|
if not isinstance(patch, nodes.paragraph):
|
||||||
continue # skip for now
|
continue # skip for now
|
||||||
|
Loading…
Reference in New Issue
Block a user