Quoting Claude from https://code.djangoproject.com/ticket/28434#comment:2, "There is a specific test <https://github.com/django/django/blob/master/tests/view_tests/tests/test_i18n.py#L388> 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."
I'd encourage you to try to debug the problem yourself by looking at Django's source code. If something about the code is unclear, feel free to ask for help. On Sunday, August 13, 2017 at 4:42:12 PM UTC-4, Stanislav wrote: > > Hi, > JavaScriptCatalog and JSONCatalog don't contain translations from > LOCALE_PATHS. > > > settings.py > > LANGUAGE_CODE = 'en-us' > TIME_ZONE = 'UTC' > USE_I18N = True > USE_L10N = True > USE_TZ = True > > LANGUAGES = [ > ('en', _('English')), > ('de', _('German')), > ('ru', _('Russian')), > ] > LOCALE_PATHS = ( > os.path.join(BASE_DIR, 'locale'), > ) > > > urls.py > > urlpatterns += i18n_patterns( > url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'), > url(r'^jsoni18n/$', JSONCatalog.as_view(), name='json-catalog'), > ) > > > terminal > > django-admin makemessages -l de > django-admin makemessages -l ru > > > I'm added translation into locale\de\LC_MESSAGES\django.po, > locale\ru\LC_MESSAGES\django.po > > terminal > > django-admin makemessages -d djangojs -l de > django-admin makemessages -d djangojs -l ru > django-admin compilemessages > > > > But the response from the > http://127.0.0.1:8000/de/jsi18n/ > http://127.0.0.1:8000/ru/jsi18n/ > http://127.0.0.1:8000/ru/jsoni18n/ > http://127.0.0.1:8000/de/jsoni18n/ > dont contain translations from LOCALE_PATHS. > This urls contains tranlate only from > django\contrib\admin\locale\de\LC_MESSAGES\djangojs.po > django\contrib\admin\locale\ru\LC_MESSAGES\djangojs.po > > I created a small case https://github.com/ctac22/django-localization > > Can anyone explain me is it a bug or a usage mistake? > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/61b41630-b4b1-49c0-879d-93ca5a600b31%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.