# HG changeset patch # User FUJIWARA Katsunori # Date 2015-04-27 15:38:16 # Node ID 64e3f97bdf08498768929379f10383309753e1cd # Parent a99931201d1bbac6ef6c700215dc8864cf0be02a i18n: extract doc string of each web commands as translatable one Before this patch, doc string of each web commands isn't extracted as translatable one, even though web commands are listed up in "hg help hgweb". This patch adds "mercurial/hgweb/webcommands.py" on to arguments of "i18n/hggettext". "i18nfunctions" added into "webcommands.py" is used by "i18n/hggettext" to get the list of functions having translatable doc string. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -120,6 +120,7 @@ i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n mercurial/templatefilters.py mercurial/templatekw.py \ mercurial/templater.py \ mercurial/filemerge.py \ + mercurial/hgweb/webcommands.py \ $(DOCFILES) > i18n/hg.pot.tmp # All strings marked for translation in Mercurial contain # ASCII characters only. But some files contain string diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1318,3 +1318,6 @@ def help(web, req, tmpl): except error.UnknownCommand: raise ErrorResponse(HTTP_NOT_FOUND) return tmpl('help', topic=topicname, doc=doc) + +# tell hggettext to extract docstrings from these functions: +i18nfunctions = commands.values()