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

« back to all changes in this revision

Viewing changes to zeroinstall/0launch-gui/utils.py

  • 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
 
# Copyright (C) 2008, Thomas Leonard
 
1
# Copyright (C) 2009, Thomas Leonard
2
2
# See the README file for details, or visit http://0install.net.
3
3
 
4
4
from zeroinstall import support
9
9
                return ""
10
10
        elif policy.get_cached(impl):
11
11
                if impl.id.startswith('/'):
12
 
                        return '(local)'
 
12
                        return _('(local)')
13
13
                elif impl.id.startswith('package:'):
14
 
                        return '(package)'
 
14
                        return _('(package)')
15
15
                else:
16
 
                        return '(cached)'
 
16
                        return _('(cached)')
17
17
        else:
18
18
                src = policy.fetcher.get_best_source(impl)
19
19
                if src:
20
20
                        return support.pretty_size(src.size)
21
21
                else:
22
 
                        return '(unavailable)'
 
22
                        return _('(unavailable)')