annotate mercurial/i18n.py @ 4079:40c9710e8182

Pass a ui from create_server to hgwebdir and a repo from hgwebdir to hgweb This allows repo pages to respect hg serve --webdir-conf <file> --style=gitweb (part of issue253). Since we're creating a ui object anyway, use it as the parentui of the ui objects created for every repo entry. This has the unintended side-effect that --name=foo on the command line will set the name of all repos. If one of the repos being served has a .hg/hgrc owned by a user that is not trusted, hg will now print the "Not trusting file..." warning when reading it. This is consistent with the behaviour from a hg serve from inside the repo.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 13 Feb 2007 10:01:44 -0200
parents 345bac2bc4ec
children 660504812daf
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
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
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