Mercurial > hg
changeset 19231:814291b5e79c
gendoc: make commnd __doc__ and extension __doc__ as translatable
Before this patch, commnd __doc__ and extension __doc__ are not translatable.
But other messages, like doc of helptalbe, section headers, are translatable.
This patch makes commnd __doc__ and extension __doc__ translatable.
author | Takumi IINO <trot.thunder@gmail.com> |
---|---|
date | Wed, 15 May 2013 15:44:55 +0900 |
parents | 889807c79384 |
children | 81d9a7f6f2e7 |
files | doc/gendoc.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/gendoc.py Thu Apr 18 15:48:22 2013 -0500 +++ b/doc/gendoc.py Wed May 15 15:44:55 2013 +0900 @@ -7,7 +7,7 @@ from mercurial import encoding from mercurial import minirst from mercurial.commands import table, globalopts -from mercurial.i18n import _ +from mercurial.i18n import gettext, _ from mercurial.help import helptable from mercurial import extensions from mercurial import util @@ -51,7 +51,7 @@ d['cmd'] = cmds[0] d['aliases'] = cmd.split("|")[1:] - d['desc'] = get_desc(attr[0].__doc__) + d['desc'] = get_desc(gettext(attr[0].__doc__)) d['opts'] = list(get_opts(attr[1])) s = 'hg ' + cmds[0] @@ -102,7 +102,7 @@ for extensionname in sorted(allextensionnames()): mod = extensions.load(None, extensionname, None) ui.write(minirst.subsection(extensionname)) - ui.write("%s\n\n" % mod.__doc__) + ui.write("%s\n\n" % gettext(mod.__doc__)) cmdtable = getattr(mod, 'cmdtable', None) if cmdtable: ui.write(minirst.subsubsection(_('Commands')))