~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/i18n.py

  • Committer: Shannon Weyrick
  • Date: 2011-11-04 13:40:04 UTC
  • mfrom: (6238 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6256.
  • Revision ID: weyrick@mozek.us-20111104134004-033t2wqhc3ydzm0a
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
        if lang:
191
191
            return lang
192
192
    return None
 
193
 
 
194
 
 
195
def load_plugin_translations(domain):
 
196
    """Load the translations for a specific plugin.
 
197
 
 
198
    :param domain: Gettext domain name (usually 'bzr-PLUGINNAME')
 
199
    """
 
200
    locale_base = os.path.dirname(
 
201
        unicode(__file__, sys.getfilesystemencoding()))
 
202
    translation = install_translations(domain=domain,
 
203
        locale_base=locale_base)
 
204
    add_fallback(translation)
 
205
    return translation