Opened 10 years ago
Last modified 10 years ago
#23328 closed Bug
get_javascript_catalog bug — at Version 2
Reported by: | None | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
There is a project with two languages: "en" and "uk" (ukrainian).
Default language is "uk".
There are pharases:
locale/ en/ djangojs.po msgid "Всім привіт!" msgstr "Hello everyone!" uk/ djangojs.po msgid "Всім привіт!" msgstr ""
In this case, the activated language "uk" phrase "Всім привіт!" will be in "en" -- "Hello everyone!".
It's a bug, because must be "uk".
I propose remove loading "en" translation as default (is better).
Or change update method for other default language:
if default_locale != 'en': for path in paths: try: catalog = gettext_module.translation(domain, path, [default_locale]) except IOError: catalog = None if catalog is not None: # t.update(catalog._catalog) # remove it t = catalog._catalog # <- add it
Change History (2)
comment:1 by , 10 years ago
Version: | 1.7-rc-2 → master |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Could you give simple steps to reproduce the issue (or attach a sample project)? I'm not an expert on translation or javascript_catalog, but my understanding is that we use
t.update(catalog._catalog)
in the code you mentioned so that any strings that don't have translations to the current locale will fallback to English.