comparison mercurial/i18n.py @ 3890:660504812daf

Enable gettext translations The new demandimport eliminates most of the gettext performance hit of importing gettext, which was doubling the run time for 'hg'. Now, with 'hg tip': dummy: .09530s no translations: .09638s translations: .09755s
author Matt Mackall <mpm@selenic.com>
date Thu, 14 Dec 2006 17:32:00 -0600
parents 345bac2bc4ec
children
comparison
equal deleted inserted replaced
3889:57b797601b61 3890:660504812daf
5 5
6 This software may be used and distributed according to the terms 6 This software may be used and distributed according to the terms
7 of the GNU General Public License, incorporated herein by reference. 7 of the GNU General Public License, incorporated herein by reference.
8 """ 8 """
9 9
10 # the import from gettext is _really_ slow 10 import gettext
11 # for now we use a dummy function 11 t = gettext.translation('hg', fallback=1)
12 gettext = lambda x: x 12 gettext = t.gettext
13 #import gettext 13 _ = gettext
14 #t = gettext.translation('hg', '/usr/share/locale', fallback=1)
15 #gettext = t.gettext