# HG changeset patch # User Dirkjan Ochtman # Date 2008-02-21 14:56:35 # Node ID ea161d6481173d059c95f8f065897a17b0368fa6 # Parent ef1c5a3b653d08a3a661c1e663af235b043e558f hgweb: no i18n in protocol responses diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -123,7 +123,7 @@ def unbundle(web, req): ssl_req = web.configbool('web', 'push_ssl', True) if ssl_req: if req.env.get('wsgi.url_scheme') != 'https': - bail(_('ssl required\n')) + bail('ssl required\n') return proto = 'https' else: @@ -131,7 +131,7 @@ def unbundle(web, req): # do not allow push unless explicitly allowed if not web.check_perm(req, 'push', False): - bail(_('push not authorized\n'), + bail('push not authorized\n', headers={'status': '401 Unauthorized'}) return @@ -143,7 +143,7 @@ def unbundle(web, req): # fail early if possible if not check_heads(): - bail(_('unsynced changes\n')) + bail('unsynced changes\n') return req.respond(HTTP_OK, HGTYPE) @@ -163,7 +163,7 @@ def unbundle(web, req): try: if not check_heads(): req.write('0\n') - req.write(_('unsynced changes\n')) + req.write('unsynced changes\n') return fp.seek(0)