annotate mercurial/i18n.py @ 1974:0d54675cd566

Delete bundle file of hg incoming in case of errors, preserve existing files. Let write_bundle always create the bundle file, check if target doesn't exist and delete it in case of errors. This way incoming only has to delete the bundle file if it was meant to be a temporary file.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 18 Mar 2006 14:36:45 +0100
parents fbf2b10011aa
children 345bac2bc4ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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
cf9a1233738a i18n first part: make '_' available for files who need it
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents:
diff changeset
4 Copyright 2005 Matt Mackall <mpm@selenic.com>
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
1401
fbf2b10011aa use a dummy function for gettext
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents: 1400
diff changeset
10 # the import from gettext is _really_ slow
fbf2b10011aa use a dummy function for gettext
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents: 1400
diff changeset
11 # for now we use a dummy function
fbf2b10011aa use a dummy function for gettext
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents: 1400
diff changeset
12 gettext = lambda x: x
fbf2b10011aa use a dummy function for gettext
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents: 1400
diff changeset
13 #import gettext
fbf2b10011aa use a dummy function for gettext
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents: 1400
diff changeset
14 #t = gettext.translation('hg', '/usr/share/locale', fallback=1)
fbf2b10011aa use a dummy function for gettext
Benoit Boissinot <benoit.boissinot@ens-lyon.org
parents: 1400
diff changeset
15 #gettext = t.gettext