~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/i18n.py

  • Committer: Gordon Tyler
  • Date: 2011-06-30 21:00:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6007.
  • Revision ID: gordon@doxxx.net-20110630210038-bzscps46jgcqtkr0
Use known executables for win32 and other platforms in test_exe_on_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
    global _translations
75
75
    if lang is None:
76
76
        lang = _get_current_locale()
77
 
    if lang is not None:
78
 
        languages = lang.split(':')
79
 
    else:
80
 
        languages = None
81
77
    _translations = _gettext.translation(
82
78
            'bzr',
83
79
            localedir=_get_locale_dir(),
84
 
            languages=languages,
 
80
            languages=lang.split(':'),
85
81
            fallback=True)
86
82
 
87
83
 
134
130
def _get_current_locale():
135
131
    if not os.environ.get('LANGUAGE'):
136
132
        from bzrlib import config
137
 
        lang = config.GlobalStack().get('language')
 
133
        lang = config.GlobalConfig().get_user_option('language')
138
134
        if lang:
139
135
            os.environ['LANGUAGE'] = lang
140
136
            return lang