# HG changeset patch # User Martin Geisler # Date 1220988759 -7200 # Node ID 46456a51e2476f9e57e985172bc28fec2f35dccb # Parent f56e788fa292f7dc618f31e9ee3bd8c299d55383 i18n: 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 -r f56e788fa292 -r 46456a51e247 doc/gendoc.py --- a/doc/gendoc.py Tue Sep 09 21:32:39 2008 +0200 +++ b/doc/gendoc.py Tue Sep 09 21:32:39 2008 +0200 @@ -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__":