/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-03-07 16:51:16 UTC
  • mfrom: (696.1.7 i18n)
  • Revision ID: jelmer@samba.org-20110307165116-0tt1ox9t59yqs2oy
MergeĀ supportĀ forĀ internationalization.

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)
65
80
 
66
81
if version_info[3] == 'final':
67
82
    version_string = '%d.%d.%d' % version_info[:3]
181
196
 
182
197
 
183
198
def _i18n(text):
184
 
    # Stub until we support proper i18n
185
 
    return text
 
199
    return gettext(text)