Ticket #3594: javascript_translation.patch

File javascript_translation.patch, 1.1 KB (added by Timo, 15 years ago)

Finally I fixed this for my own use.

  • django/views/i18n.py

     
    116116        paths.append(path)
    117117        catalog = gettext_module.translation(domain, path, ['en'])
    118118        t.update(catalog._catalog)
    119     # next load the settings.LANGUAGE_CODE translations if it isn't english
    120     if default_locale != 'en':
     119    # next load the currently selected language, if it isn't english
     120    if locale != 'en':
    121121        for path in paths:
    122122            try:
    123                 catalog = gettext_module.translation(domain, path, [default_locale])
    124             except IOError:
    125                 catalog = None
    126             if catalog is not None:
    127                 t.update(catalog._catalog)
    128     # last load the currently selected language, if it isn't identical to the default.
    129     if locale != default_locale:
    130         for path in paths:
    131             try:
    132123                catalog = gettext_module.translation(domain, path, [locale])
    133124            except IOError:
    134125                catalog = None
Back to Top