Answer the question
In order to leave comments, you need to log in
Django 1.11: How to include a translation file in JavaScriptCatalog?
File with translation from locale\ru\LC_MESSAGES to JavaScriptCatalog is not picked up.
settings.py
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
LANGUAGES = [
('ru', _('Russian')),
('en', _('English')),
]
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
)
urlpatterns += i18n_patterns(
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'),
)
django-admin makemessages -l ru
django-admin makemessages -d djangojs -l ru
django-admin compilemessages
Answer the question
In order to leave comments, you need to log in
Asked this question on stackoverflow, django forum - nobody knows. Filed it as a bug to the django developers, but was sent to tinker with the tests
There is a specific test for that in the Django test suite. It may be the test is missing something, but you should explore that yourself and explain it if it's the case.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question