i18n: ignore docstring for modules under mercurial
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 15 Aug 2017 21:06:26 +0900
changeset 33819 d5ef17608159
parent 33818 ed04d7254a91
child 33820 fa7e30efe05a
i18n: ignore docstring for modules under mercurial Docstring of modules is needed only for "hg help -e EXTNAME". This is a preparation for applying hggettext on util.py, which has module docstring, but it isn't needed for translation.
i18n/hggettext
--- a/i18n/hggettext	Tue Aug 15 19:27:24 2017 +0900
+++ b/i18n/hggettext	Tue Aug 15 21:06:26 2017 +0900
@@ -103,7 +103,7 @@
     only extract docstrings from functions mentioned in these tables.
     """
     mod = importpath(path)
-    if mod.__doc__:
+    if not path.startswith('mercurial/') and mod.__doc__:
         src = open(path).read()
         lineno = 1 + offset(src, mod.__doc__, path, 7)
         print(poentry(path, lineno, mod.__doc__))