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'),
)
}}}
The command line
{{{
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
The command line
{{{
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/ru/jsi18n/,
http://127.0.0.1:8000/de/jsi18n/
http://127.0.0.1:8000/ru/jsoni18n/
http://127.0.0.1:8000/de/jsoni18n/
does not contains translate 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 asked about this problem in 3 forums, but no one could answer.
Full code here https://github.com/ctac22/django-
translation/tree/master/myproject
--
Ticket URL: <https://code.djangoproject.com/ticket/28434>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tim Graham):
It looks like only translations from `contrib.admin` are present (and none
of the other contrib apps). I don't have much usage experience with
`JavaScriptCatalog` and can't tell if this is a bug or a usage mistake.
--
Ticket URL: <https://code.djangoproject.com/ticket/28434#comment:1>
* status: new => closed
* resolution: => needsinfo
Comment:
There is a
[https://github.com/django/django/blob/master/tests/view_tests/tests/test_i18n.py#L388
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/28434#comment:2>