Ticket #3594: javascript_translation_r8521.patch

File javascript_translation_r8521.patch, 1.1 KB (added by Manuel Saelices, 16 years ago)

Patch updated to last version, r8521.

  • django/views/i18n.py

     
    137137        except IOError:
    138138            # 'en' catalog was missing. This is harmless.
    139139            pass
    140     # next load the settings.LANGUAGE_CODE translations if it isn't english
    141     if default_locale != 'en':
     140    # next load the currently selected language, if it isn't english
     141    if locale != 'en':
    142142        for path in paths:
    143143            try:
    144                 catalog = gettext_module.translation(domain, path, [default_locale])
    145             except IOError:
    146                 catalog = None
    147             if catalog is not None:
    148                 t.update(catalog._catalog)
    149     # last load the currently selected language, if it isn't identical to the default.
    150     if locale != default_locale:
    151         for path in paths:
    152             try:
    153144                catalog = gettext_module.translation(domain, path, [locale])
    154145            except IOError:
    155146                catalog = None
Back to Top