Opened 12 months ago

Last modified 5 months ago

#22822 assigned Bug

Javascript en_* translations ignored if no en or en_us translations exist

Reported by: pforth@… Owned by: anonymous
Component: Internationalization Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by timo)

If there is no djangojs.mo in either the en, en_US, en_US.ISO8859-1 or en.ISO8859-1 directories, then the django.mo translation files in any other en based translation directory (such as en_gb or en_ca) will be ignored.

This is because of the lines:

       if en_selected and en_catalog_missing:
            t = {}
        else: #.... actually go on and build up the dictionary for the catalog.

Without an en or en_us translation, en_catalog_missing will be true and for something like en_gb, en_selected will also be true. This means that en_gb will never be loaded.

This error can happen often since much of the time you won't bother creating an en or en_us translation file since that is the main language you are building in.

Change History (4)

comment:1 Changed 12 months ago by pforth@…

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to anonymous
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 10 months ago by tushar

  • Component changed from Uncategorized to Translations
  • Type changed from Uncategorized to Bug

comment:3 Changed 10 months ago by timo

  • Description modified (diff)

comment:4 Changed 5 months ago by timgraham

  • Component changed from Translations to Internationalization
  • Triage Stage changed from Unreviewed to Accepted

I haven't used javascript_catalog before, but this does seems like a funny restriction. If it cannot be fixed for some reason, we should at least document it.

Note: See TracTickets for help on using tickets.
Back to Top