Skip to content
Snippets Groups Projects
Commit d5ef1760 authored by Katsunori FUJIWARA's avatar Katsunori FUJIWARA
Browse files

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.
parent ed04d725
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
only extract docstrings from functions mentioned in these tables. only extract docstrings from functions mentioned in these tables.
""" """
mod = importpath(path) mod = importpath(path)
if mod.__doc__: if not path.startswith('mercurial/') and mod.__doc__:
src = open(path).read() src = open(path).read()
lineno = 1 + offset(src, mod.__doc__, path, 7) lineno = 1 + offset(src, mod.__doc__, path, 7)
print(poentry(path, lineno, mod.__doc__)) print(poentry(path, lineno, mod.__doc__))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment