Mercurial > hg-stable
changeset 1400:cf9a1233738a
i18n first part: make '_' available for files who need it
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org |
---|---|
date | Tue, 18 Oct 2005 18:37:48 -0700 |
parents | 9a70776e355e |
children | fbf2b10011aa |
files | mercurial/changelog.py mercurial/commands.py mercurial/dirstate.py mercurial/hgweb.py mercurial/httprepo.py mercurial/i18n.py mercurial/localrepo.py mercurial/manifest.py mercurial/revlog.py mercurial/sshrepo.py mercurial/transaction.py mercurial/ui.py mercurial/util.py |
diffstat | 13 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changelog.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/changelog.py Tue Oct 18 18:37:48 2005 -0700 @@ -6,6 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from revlog import * +from i18n import gettext as _ from demandload import demandload demandload(globals(), "os time util")
--- a/mercurial/commands.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/commands.py Tue Oct 18 18:37:48 2005 -0700 @@ -7,6 +7,7 @@ from demandload import demandload from node import * +from i18n import gettext as _ demandload(globals(), "os re sys signal shutil imp urllib pdb") demandload(globals(), "fancyopts ui hg util lock revlog") demandload(globals(), "fnmatch hgweb mdiff random signal time traceback")
--- a/mercurial/dirstate.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/dirstate.py Tue Oct 18 18:37:48 2005 -0700 @@ -9,6 +9,7 @@ import struct, os from node import * +from i18n import gettext as _ from demandload import * demandload(globals(), "time bisect stat util re")
--- a/mercurial/hgweb.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/hgweb.py Tue Oct 18 18:37:48 2005 -0700 @@ -11,6 +11,7 @@ demandload(globals(), "mdiff time re socket zlib errno ui hg ConfigParser") demandload(globals(), "zipfile tempfile StringIO tarfile BaseHTTPServer util") from node import * +from i18n import gettext as _ def templatepath(): for f in "templates", "../templates":
--- a/mercurial/httprepo.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/httprepo.py Tue Oct 18 18:37:48 2005 -0700 @@ -7,6 +7,7 @@ from node import * from remoterepo import * +from i18n import gettext as _ from demandload import * demandload(globals(), "hg os urllib urllib2 urlparse zlib util")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/i18n.py Tue Oct 18 18:37:48 2005 -0700 @@ -0,0 +1,12 @@ +""" +i18n.py - internationalization support for mercurial + +Copyright 2005 Matt Mackall <mpm@selenic.com> + +This software may be used and distributed according to the terms +of the GNU General Public License, incorporated herein by reference. +""" + +import gettext +t = gettext.translation('hg', '/usr/share/locale', fallback=1) +gettext = t.gettext
--- a/mercurial/localrepo.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/localrepo.py Tue Oct 18 18:37:48 2005 -0700 @@ -8,6 +8,7 @@ import struct, os, util import filelog, manifest, changelog, dirstate, repo from node import * +from i18n import gettext as _ from demandload import * demandload(globals(), "re lock transaction tempfile stat mdiff errno")
--- a/mercurial/manifest.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/manifest.py Tue Oct 18 18:37:48 2005 -0700 @@ -7,6 +7,7 @@ import sys, struct from revlog import * +from i18n import gettext as _ from demandload import * demandload(globals(), "bisect")
--- a/mercurial/revlog.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/revlog.py Tue Oct 18 18:37:48 2005 -0700 @@ -11,6 +11,7 @@ """ from node import * +from i18n import gettext as _ from demandload import demandload demandload(globals(), "binascii errno heapq mdiff sha struct zlib")
--- a/mercurial/sshrepo.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/sshrepo.py Tue Oct 18 18:37:48 2005 -0700 @@ -7,6 +7,7 @@ from node import * from remoterepo import * +from i18n import gettext as _ from demandload import * demandload(globals(), "hg os re stat")
--- a/mercurial/transaction.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/transaction.py Tue Oct 18 18:37:48 2005 -0700 @@ -13,6 +13,7 @@ import os import util +from i18n import gettext as _ class transaction: def __init__(self, report, opener, journal, after=None):
--- a/mercurial/ui.py Tue Oct 18 17:57:27 2005 -0700 +++ b/mercurial/ui.py Tue Oct 18 18:37:48 2005 -0700 @@ -6,6 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. import os, ConfigParser +from i18n import gettext as _ from demandload import * demandload(globals(), "re socket sys util")