Opened 10 years ago
Last modified 10 years ago
#23328 closed Bug
get_javascript_catalog bug — at Initial Version
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
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