i18n: show localized messages for commands/extensions in hgweb help top (issue3383) stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 19 Apr 2012 20:54:56 +0900
branchstable
changeset 16469 dd68c972d089
parent 16468 2fb521d75dc2
child 16470 b2e1da5db6df
i18n: show localized messages for commands/extensions in hgweb help top (issue3383) in hgweb help top page, help topics are localized, but abstracts of commands and extensions are not, although these are already translated. it is because localized messages for them should be explicitly looked up by original ones. this patch looks localized messages up for each commands/extensions.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Thu Apr 19 23:36:42 2012 +0200
+++ b/mercurial/hgweb/webcommands.py	Thu Apr 19 20:54:56 2012 +0900
@@ -806,7 +806,7 @@
 def _getdoc(e):
     doc = e[0].__doc__
     if doc:
-        doc = doc.split('\n')[0]
+        doc = _(doc).split('\n')[0]
     else:
         doc = _('(no help text available)')
     return doc