doc/hgmanpage.py
changeset 14633 cdda48c93676
parent 12865 4c50552fc9bc
child 14764 a7d5816087a9
--- a/doc/hgmanpage.py	Thu Jun 16 08:49:26 2011 +0200
+++ b/doc/hgmanpage.py	Thu Jun 16 19:34:42 2011 +0200
@@ -48,6 +48,7 @@
 
 from docutils import nodes, writers, languages
 import roman
+import inspect
 
 FIELD_LIST_INDENT = 7
 DEFINITION_LIST_INDENT = 7
@@ -160,7 +161,12 @@
         nodes.NodeVisitor.__init__(self, document)
         self.settings = settings = document.settings
         lcode = settings.language_code
-        self.language = languages.get_language(lcode)
+        arglen = len(inspect.getargspec(languages.get_language)[0])
+        if arglen == 2:
+            self.language = languages.get_language(lcode,
+                                                   self.document.reporter)
+        else:
+            self.language = languages.get_language(lcode)
         self.head = []
         self.body = []
         self.foot = []