view mercurial/i18n.py @ 6669:782dbbdfb1d7

fix traceback in hgweb when URL doesn't end in one of the archive specs If the last n charecters of the URL doesn't match an entry in archive_specs req.form never has a key 'type'. When achive() looks up 'type' in the form dict it causes a traceback rather than printing an error message.
author Ali Saidi <saidi@eecs.umich.edu>
date Fri, 13 Jun 2008 12:33:40 +0200
parents 660504812daf
children 85ae7aaf08e9
line wrap: on
line source

"""
i18n.py - internationalization support for mercurial

Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>

This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
"""

import gettext
t = gettext.translation('hg', fallback=1)
gettext = t.gettext
_ = gettext