Mercurial > hg-stable
changeset 7014:46456a51e247
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.
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Tue, 09 Sep 2008 21:32:39 +0200 |
parents | f56e788fa292 |
children | 6651de7176a0 |
files | doc/gendoc.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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__":