/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-10 18:44:39 UTC
  • mto: This revision was merged to the branch mainline in revision 730.
  • Revision ID: jelmer@samba.org-20110410184439-g7hqaacexqtviq13
Move i18n support to a separate file, so gettext files aren't loaded unless bzr-gtk is used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    bzr_plugin_version as version_info,
63
63
    bzr_compatible_versions,
64
64
    )
65
 
from gettext import (
66
 
    gettext,
67
 
    textdomain,
68
 
    bindtextdomain,
69
 
    bind_textdomain_codeset,
70
 
    )
71
 
 
72
 
# FIXME: We should find out LOCALEDIR at compile or run time. The current
73
 
# hardcoded path will work for most distributions, but not for e.g. Solaris and
74
 
# Windows
75
 
GETTEXT_PACKAGE = 'bzr-gtk'
76
 
LOCALEDIR = '/usr/share/locale'
77
 
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR)
78
 
bind_textdomain_codeset(GETTEXT_PACKAGE, 'UTF-8')
79
 
textdomain(GETTEXT_PACKAGE)
80
65
 
81
66
if version_info[3] == 'final':
82
67
    version_string = '%d.%d.%d' % version_info[:3]
194
179
            sys.setdefaultencoding(default_encoding)
195
180
    return basic_tests
196
181
 
197
 
 
198
 
def _i18n(text):
199
 
    return gettext(text)