##// END OF EJS Templates
i18n first part: make '_' available for files who need it
Benoit Boissinot -
r1400:cf9a1233 default
parent child Browse files
Show More
@@ -0,0 +1,12 b''
1 """
2 i18n.py - internationalization support for mercurial
3
4 Copyright 2005 Matt Mackall <mpm@selenic.com>
5
6 This software may be used and distributed according to the terms
7 of the GNU General Public License, incorporated herein by reference.
8 """
9
10 import gettext
11 t = gettext.translation('hg', '/usr/share/locale', fallback=1)
12 gettext = t.gettext
@@ -6,6 +6,7 b''
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 from revlog import *
8 from revlog import *
9 from i18n import gettext as _
9 from demandload import demandload
10 from demandload import demandload
10 demandload(globals(), "os time util")
11 demandload(globals(), "os time util")
11
12
@@ -7,6 +7,7 b''
7
7
8 from demandload import demandload
8 from demandload import demandload
9 from node import *
9 from node import *
10 from i18n import gettext as _
10 demandload(globals(), "os re sys signal shutil imp urllib pdb")
11 demandload(globals(), "os re sys signal shutil imp urllib pdb")
11 demandload(globals(), "fancyopts ui hg util lock revlog")
12 demandload(globals(), "fancyopts ui hg util lock revlog")
12 demandload(globals(), "fnmatch hgweb mdiff random signal time traceback")
13 demandload(globals(), "fnmatch hgweb mdiff random signal time traceback")
@@ -9,6 +9,7 b' of the GNU General Public License, incor'
9
9
10 import struct, os
10 import struct, os
11 from node import *
11 from node import *
12 from i18n import gettext as _
12 from demandload import *
13 from demandload import *
13 demandload(globals(), "time bisect stat util re")
14 demandload(globals(), "time bisect stat util re")
14
15
@@ -11,6 +11,7 b' from demandload import demandload'
11 demandload(globals(), "mdiff time re socket zlib errno ui hg ConfigParser")
11 demandload(globals(), "mdiff time re socket zlib errno ui hg ConfigParser")
12 demandload(globals(), "zipfile tempfile StringIO tarfile BaseHTTPServer util")
12 demandload(globals(), "zipfile tempfile StringIO tarfile BaseHTTPServer util")
13 from node import *
13 from node import *
14 from i18n import gettext as _
14
15
15 def templatepath():
16 def templatepath():
16 for f in "templates", "../templates":
17 for f in "templates", "../templates":
@@ -7,6 +7,7 b''
7
7
8 from node import *
8 from node import *
9 from remoterepo import *
9 from remoterepo import *
10 from i18n import gettext as _
10 from demandload import *
11 from demandload import *
11 demandload(globals(), "hg os urllib urllib2 urlparse zlib util")
12 demandload(globals(), "hg os urllib urllib2 urlparse zlib util")
12
13
@@ -8,6 +8,7 b''
8 import struct, os, util
8 import struct, os, util
9 import filelog, manifest, changelog, dirstate, repo
9 import filelog, manifest, changelog, dirstate, repo
10 from node import *
10 from node import *
11 from i18n import gettext as _
11 from demandload import *
12 from demandload import *
12 demandload(globals(), "re lock transaction tempfile stat mdiff errno")
13 demandload(globals(), "re lock transaction tempfile stat mdiff errno")
13
14
@@ -7,6 +7,7 b''
7
7
8 import sys, struct
8 import sys, struct
9 from revlog import *
9 from revlog import *
10 from i18n import gettext as _
10 from demandload import *
11 from demandload import *
11 demandload(globals(), "bisect")
12 demandload(globals(), "bisect")
12
13
@@ -11,6 +11,7 b' of the GNU General Public License, incor'
11 """
11 """
12
12
13 from node import *
13 from node import *
14 from i18n import gettext as _
14 from demandload import demandload
15 from demandload import demandload
15 demandload(globals(), "binascii errno heapq mdiff sha struct zlib")
16 demandload(globals(), "binascii errno heapq mdiff sha struct zlib")
16
17
@@ -7,6 +7,7 b''
7
7
8 from node import *
8 from node import *
9 from remoterepo import *
9 from remoterepo import *
10 from i18n import gettext as _
10 from demandload import *
11 from demandload import *
11 demandload(globals(), "hg os re stat")
12 demandload(globals(), "hg os re stat")
12
13
@@ -13,6 +13,7 b''
13
13
14 import os
14 import os
15 import util
15 import util
16 from i18n import gettext as _
16
17
17 class transaction:
18 class transaction:
18 def __init__(self, report, opener, journal, after=None):
19 def __init__(self, report, opener, journal, after=None):
@@ -6,6 +6,7 b''
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import os, ConfigParser
8 import os, ConfigParser
9 from i18n import gettext as _
9 from demandload import *
10 from demandload import *
10 demandload(globals(), "re socket sys util")
11 demandload(globals(), "re socket sys util")
11
12
@@ -11,6 +11,7 b' platform-specific details from the core.'
11 """
11 """
12
12
13 import os, errno
13 import os, errno
14 from i18n import gettext as _
14 from demandload import *
15 from demandload import *
15 demandload(globals(), "re cStringIO shutil popen2 tempfile threading time")
16 demandload(globals(), "re cStringIO shutil popen2 tempfile threading time")
16
17
General Comments 0
You need to be logged in to leave comments. Login now