# HG changeset patch # User Benoit Boissinot + +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 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -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") diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -7,6 +7,7 @@ import sys, struct from revlog import * +from i18n import gettext as _ from demandload import * demandload(globals(), "bisect") diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -11,6 +11,7 @@ of the GNU General Public License, incor """ from node import * +from i18n import gettext as _ from demandload import demandload demandload(globals(), "binascii errno heapq mdiff sha struct zlib") diff --git a/mercurial/sshrepo.py b/mercurial/sshrepo.py --- a/mercurial/sshrepo.py +++ b/mercurial/sshrepo.py @@ -7,6 +7,7 @@ from node import * from remoterepo import * +from i18n import gettext as _ from demandload import * demandload(globals(), "hg os re stat") diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -13,6 +13,7 @@ import os import util +from i18n import gettext as _ class transaction: def __init__(self, report, opener, journal, after=None): diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -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") diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -11,6 +11,7 @@ platform-specific details from the core. """ import os, errno +from i18n import gettext as _ from demandload import * demandload(globals(), "re cStringIO shutil popen2 tempfile threading time")