i18n: extract doc string of each web commands as translatable one stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 28 Apr 2015 00:38:16 +0900
branchstable
changeset 24859 64e3f97bdf08
parent 24858 a99931201d1b
child 24860 263ec70769cb
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.
Makefile
mercurial/hgweb/webcommands.py
--- a/Makefile	Fri Apr 24 23:23:55 2015 -0400
+++ b/Makefile	Tue Apr 28 00:38:16 2015 +0900
@@ -120,6 +120,7 @@
 	  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
--- a/mercurial/hgweb/webcommands.py	Fri Apr 24 23:23:55 2015 -0400
+++ b/mercurial/hgweb/webcommands.py	Tue Apr 28 00:38:16 2015 +0900
@@ -1318,3 +1318,6 @@
     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()