mirror of
https://github.com/django/django.git
synced 2025-10-29 02:52:24 +00:00
Fixed #13514 -- Corrected the process of loading multiple javascript translation catalogs. Thanks to jtiai for the report, to Ramiro Morales for working out the test case, and to Ramiro and Jannis for their help on the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b29b0f8cac
commit
21e84194b5
22 changed files with 191 additions and 15 deletions
|
|
@ -213,13 +213,16 @@ def javascript_catalog(request, domain='djangojs', packages=None):
|
|||
if en_catalog_missing:
|
||||
t = {}
|
||||
else:
|
||||
locale_t = {}
|
||||
for path in paths:
|
||||
try:
|
||||
catalog = gettext_module.translation(domain, path, [locale])
|
||||
except IOError:
|
||||
catalog = None
|
||||
if catalog is not None:
|
||||
t = catalog._catalog
|
||||
locale_t.update(catalog._catalog)
|
||||
if locale_t:
|
||||
t = locale_t
|
||||
src = [LibHead]
|
||||
plural = None
|
||||
if '' in t:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue