diff options
author | Georg Brandl <georg@python.org> | 2012-10-30 10:48:48 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-10-30 10:48:48 +0100 |
commit | c411b51fbbdaae201331123c5a449ea7f5f8b0c8 (patch) | |
tree | 11d01f547c257628546090ba278b170a476cfda9 | |
parent | f4cfc4531931a845b093823d12a7eefe00b2dc45 (diff) | |
download | sphinx-git-c411b51fbbdaae201331123c5a449ea7f5f8b0c8.tar.gz |
Closes #998: fix manpage writer in expectation of docutils 0.10 API change
-rw-r--r-- | sphinx/writers/manpage.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index 81f2988b2..e074691e4 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -72,6 +72,11 @@ class ManualPageTranslator(BaseTranslator): # since self.append_header() is never called, need to do this here self.body.append(MACRO_DEF) + # Overwrite admonition label translations with our own + for label, translation in admonitionlabels.items(): + self.language.labels[label] = self.deunicode(translation) + + # overwritten -- added quotes around all .TH arguments def header(self): tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\"" @@ -193,12 +198,6 @@ class ManualPageTranslator(BaseTranslator): def depart_seealso(self, node): self.depart_admonition(node) - # overwritten -- use our own label translations - def visit_admonition(self, node, name=None): - if name: - self.body.append('.IP %s\n' % - self.deunicode(admonitionlabels.get(name, name))) - def visit_productionlist(self, node): self.ensure_eol() names = [] |