[PATCH 1 of 9 STABLE?] gendoc: make commnd __doc__ and extension __doc__ as translatable
Takumi IINO
trot.thunder at gmail.com
Tue May 14 02:29:10 CDT 2013
# HG changeset patch
# User Takumi IINO <trot.thunder at gmail.com>
# Date 1368513072 -32400
# Tue May 14 15:31:12 2013 +0900
# Branch stable
# Node ID 8fcb89ec61775279bcecf73cd839c29991fbab4c
# Parent 12dbdd348bb0977366200bf96cb6d2afa85faf13
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.
diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -51,7 +51,7 @@
d['cmd'] = cmds[0]
d['aliases'] = cmd.split("|")[1:]
- d['desc'] = get_desc(attr[0].__doc__)
+ d['desc'] = get_desc(_(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" % _(mod.__doc__))
cmdtable = getattr(mod, 'cmdtable', None)
if cmdtable:
ui.write(minirst.subsubsection(_('Commands')))
More information about the Mercurial-devel
mailing list