Workaround to fix #378

See https://github.com/zyegfryed/django-statici18n/pull/29 for real fix
This commit is contained in:
Raphael Michel
2017-01-18 10:00:42 +01:00
parent f2260212ee
commit 9f90ac80a0
5 changed files with 6 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ compress:
jsi18n: localecompile
./manage.py compilejsi18n
./manage.py compilejsi18n -l de-informal
test:
py.test tests

View File

@@ -11,5 +11,6 @@ class Command(BaseCommand):
periodic_task.send(self)
call_command('compilemessages', verbosity=1, interactive=False)
call_command('compilejsi18n', verbosity=1, interactive=False)
call_command('compilejsi18n', locale='de-informal', verbosity=1, interactive=False)
call_command('collectstatic', verbosity=1, interactive=False)
call_command('compress', verbosity=1, interactive=False)

View File

@@ -1,9 +1,7 @@
from django.utils import timezone
from django.views.decorators.cache import cache_page
from django.views.decorators.http import etag
from django.views.i18n import (
get_javascript_catalog, render_javascript_catalog, to_locale,
)
from django.views.i18n import get_javascript_catalog, render_javascript_catalog
# Yes, we want to regenerate this every time the module has been imported to
# refresh the cache at least at every code deployment
@@ -21,5 +19,5 @@ js_info_dict = {
@cache_page(3600, key_prefix='js18n-%s' % import_date)
def js_catalog(request, lang):
packages = ['pretix']
catalog, plural = get_javascript_catalog(to_locale(lang), 'djangojs', packages)
catalog, plural = get_javascript_catalog(lang, 'djangojs', packages)
return render_javascript_catalog(catalog, plural)

View File

@@ -92,7 +92,7 @@ msgstr "Ein Fehler ist aufgetreten. Fehlercode: {code}"
#: pretix/static/pretixpresale/js/ui/asyncdownload.js:53
#: pretix/static/pretixpresale/js/ui/asynctask.js:103
msgid "We are processing your request …"
msgstr "Wir verarbeiten deine Anfrage …"
msgstr "Wir verarbeiten Ihre Anfrage …"
#: pretix/static/pretixpresale/js/ui/asyncdownload.js:54
#: pretix/static/pretixpresale/js/ui/asynctask.js:104

View File

@@ -30,6 +30,7 @@ class CustomBuild(build):
management.call_command('compilemessages', verbosity=1, interactive=False)
management.call_command('compilejsi18n', verbosity=1, interactive=False)
management.call_command('compilejsi18n', locale='de-informal', verbosity=1, interactive=False)
management.call_command('collectstatic', verbosity=1, interactive=False)
management.call_command('compress', verbosity=1, interactive=False)
build.run(self)