~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/i18n.py

Fix i18n use when no environment variables are set. (Jelmer Vernooij, #810701)

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