Ticket #5853: views.i18n_no_en_required.diff

File views.i18n_no_en_required.diff, 772 bytes (added by miracle2k, 17 years ago)
  • i18n.py

     
    114114        p = __import__(package, {}, {}, [''])
    115115        path = os.path.join(os.path.dirname(p.__file__), 'locale')
    116116        paths.append(path)
    117         catalog = gettext_module.translation(domain, path, ['en'])
    118         t.update(catalog._catalog)
     117        try:
     118            catalog = gettext_module.translation(domain, path, ['en'])           
     119        except IOError:
     120            catalog = None
     121        if catalog is not None:
     122            t.update(catalog._catalog)
    119123    # next load the settings.LANGUAGE_CODE translations if it isn't english
    120124    if default_locale != 'en':
    121125        for path in paths:
Back to Top