do not use locale version of admonition labels
The admonition labels from the Sphinx code base are translated, but we don't initialize the translation machinery when we convert the release notes to text because we only publish the original text version. The labels default to capitalized versions, so just use title() to produce something similar without going through the un-initialized locale code. This fixes the traceback we saw when publishing the newton release announcement for nova: http://logs.openstack.org/ad/ad68ee297842d142749877ccc66a6b677b576279/release/nova-announce-release/b6ca7ae/console.html Change-Id: I29906fd0af2a507e3131923a659b7448d293dbc7 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
7730b76a96
commit
58c61a7fcb
|
@ -32,7 +32,6 @@ from docutils import writers
|
|||
from six.moves import zip_longest
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.locale import admonitionlabels
|
||||
|
||||
|
||||
def convert(source):
|
||||
|
@ -730,7 +729,7 @@ class TextTranslator(nodes.NodeVisitor):
|
|||
|
||||
def _make_depart_admonition(name):
|
||||
def depart_admonition(self, node):
|
||||
self.end_state(first=admonitionlabels[name] + ': ')
|
||||
self.end_state(first=name.title() + ': ')
|
||||
return depart_admonition
|
||||
|
||||
visit_attention = _visit_admonition
|
||||
|
|
Loading…
Reference in New Issue