i18n/hggettext
changeset 33815 97ee669f1f6d
parent 33621 16a175b3681e
child 33817 726dd73df3b9
--- a/i18n/hggettext	Fri Aug 11 14:21:49 2017 +0200
+++ b/i18n/hggettext	Wed Aug 02 01:03:20 2017 +0900
@@ -122,9 +122,14 @@
             name = "%s.%s" % (actualpath, func.__name__)
             lineno = inspect.getsourcelines(func)[1]
             doc = func.__doc__
+            origdoc = getattr(func, '_origdoc', '')
             if rstrip:
                 doc = doc.rstrip()
-            lineno += offset(src, doc, name, 1)
+                origdoc = origdoc.rstrip()
+            if origdoc:
+                lineno += offset(src, origdoc, name, 1)
+            else:
+                lineno += offset(src, doc, name, 1)
             print(poentry(actualpath, lineno, doc))