mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #27374 -- Made JavaScriptCatalog respect the packages argument.
This commit is contained in:
committed by
Tim Graham
parent
9b9c8c4a81
commit
6b5106b1ce
@@ -356,7 +356,8 @@ class JavaScriptCatalog(View):
|
||||
domain = kwargs.get('domain', self.domain)
|
||||
# If packages are not provided, default to all installed packages, as
|
||||
# DjangoTranslation without localedirs harvests them all.
|
||||
packages = kwargs.get('packages', '').split('+') or self.packages
|
||||
packages = kwargs.get('packages', '')
|
||||
packages = packages.split('+') if packages else self.packages
|
||||
paths = self.get_paths(packages) if packages else None
|
||||
self.translation = DjangoTranslation(locale, domain=domain, localedirs=paths)
|
||||
context = self.get_context_data(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user