~ubuntu-branches/ubuntu/karmic/zeroinstall-injector/karmic

« back to all changes in this revision

Viewing changes to zeroinstall/0launch-gui/0launch-gui

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Leonard
  • Date: 2009-04-05 10:40:06 UTC
  • mfrom: (1.1.9 upstream) (6.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090405104006-e3x93j5ibvjqu65a
Tags: 0.39-1ubuntu1
* Updated build for Python 2.6.
* FFe: LP: #336317.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
 
# Copyright (C) 2008, Thomas Leonard
 
2
# Copyright (C) 2009, Thomas Leonard
3
3
# See the README file for details, or visit http://0install.net.
4
4
import os, sys
5
5
 
12
12
 
13
13
import pygtk; pygtk.require('2.0')
14
14
 
15
 
__builtins__._ = lambda x: x
 
15
try:
 
16
        # set up the gettext system and locales
 
17
        from gtk import glade
 
18
        import gettext
 
19
        import locale
 
20
 
 
21
        locale.setlocale(locale.LC_ALL, '')
 
22
        for module in glade, gettext:
 
23
                localedir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
 
24
                                 'locale')
 
25
                if os.path.isdir(localedir):
 
26
                        module.bindtextdomain('zero-install', localedir)
 
27
                module.textdomain('zero-install')
 
28
 
 
29
        __builtins__._ = gettext.gettext
 
30
except ImportError:
 
31
        __builtins__._ = lambda x: x
16
32
 
17
33
import main
18
34