~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/i18n.py

  • Committer: Jelmer Vernooij
  • Date: 2011-07-14 22:14:52 UTC
  • mto: This revision was merged to the branch mainline in revision 6026.
  • Revision ID: jelmer@samba.org-20110714221452-hd1yap5lgdbsjyx3
Fix i18n use when no environment variables are set.

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