~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/i18n.py

  • Committer: Vincent Ladeuil
  • Date: 2011-08-12 09:49:24 UTC
  • mfrom: (6015.9.10 2.4)
  • mto: This revision was merged to the branch mainline in revision 6066.
  • Revision ID: v.ladeuil+lp@free.fr-20110812094924-knc5s0g7vs31a2f1
Merge 2.4 into trunk

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
77
81
    _translations = _gettext.translation(
78
82
            'bzr',
79
83
            localedir=_get_locale_dir(),
80
 
            languages=lang.split(':'),
 
84
            languages=languages,
81
85
            fallback=True)
82
86
 
83
87
 
130
134
def _get_current_locale():
131
135
    if not os.environ.get('LANGUAGE'):
132
136
        from bzrlib import config
133
 
        lang = config.GlobalConfig().get_user_option('language')
 
137
        lang = config.GlobalStack().get('language')
134
138
        if lang:
135
139
            os.environ['LANGUAGE'] = lang
136
140
            return lang