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.
--- 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__":