mercurial/i18n.py
author Matt Mackall <mpm@selenic.com>
Thu, 14 Dec 2006 17:32:00 -0600
changeset 3890 660504812daf
parent 2858 345bac2bc4ec
permissions -rw-r--r--
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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1400
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     1
"""
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     2
i18n.py - internationalization support for mercurial
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     3
2858
345bac2bc4ec update copyrights.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1401
diff changeset
     4
Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
1400
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     5
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     6
This software may be used and distributed according to the terms
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     7
of the GNU General Public License, incorporated herein by reference.
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     8
"""
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
     9
3890
660504812daf Enable gettext translations
Matt Mackall <mpm@selenic.com>
parents: 2858
diff changeset
    10
import gettext
660504812daf Enable gettext translations
Matt Mackall <mpm@selenic.com>
parents: 2858
diff changeset
    11
t = gettext.translation('hg', fallback=1)
660504812daf Enable gettext translations
Matt Mackall <mpm@selenic.com>
parents: 2858
diff changeset
    12
gettext = t.gettext
660504812daf Enable gettext translations
Matt Mackall <mpm@selenic.com>
parents: 2858
diff changeset
    13
_ = gettext