[PATCH 3 of 6] use gettext instead of _
Martin Geisler
mg at daimi.au.dk
Fri Sep 5 18:11:19 CDT 2008
# HG changeset patch
# User Martin Geisler <mg at daimi.au.dk>
# Date 1220649004 -7200
# Node ID 86c6d73f6169d4bc32a10fcf1008360eb1a318fc
# Parent 116387a8ddd935c6e4028e53813351fc0358d431
use gettext instead of _
Both gettext and _ trigger a translation at runtime, but _ can only be
used with a string argument since it also triggers string extraction.
diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -3,7 +3,7 @@
sys.path.insert(0, "..")
from mercurial import demandimport; demandimport.enable()
from mercurial.commands import table, globalopts
-from mercurial.i18n import gettext as _
+from mercurial.i18n import gettext, _
from mercurial.help import helptable
def get_desc(docstr):
@@ -93,10 +93,10 @@
# print topics
for names, section, doc in helptable:
- underlined(_(section).upper())
+ underlined(gettext(section).upper())
if callable(doc):
doc = doc()
- ui.write(_(doc))
+ ui.write(gettext(doc))
ui.write("\n")
if __name__ == "__main__":
More information about the Mercurial-devel
mailing list