[Django] #28434: JavaScriptCatalog, JSONCatalog does not contains translate from LOCALE_PATHS

34 views
Skip to first unread message

Django

unread,
Jul 25, 2017, 6:08:01 AM7/25/17
to django-...@googlegroups.com
#28434: JavaScriptCatalog, JSONCatalog does not contains translate from
LOCALE_PATHS
------------------------------------------------+------------------------
Reporter: Stanislav | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
JavaScriptCatalog and JSONCatalog does not contains translate from
locale\de\LC_MESSAGES\django.po or translate from
locale\ru\LC_MESSAGES\django.po.

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.

Django

unread,
Jul 25, 2017, 6:58:52 PM7/25/17
to django-...@googlegroups.com
#28434: JavaScriptCatalog and JSONCatalog don't contain translatations from
LOCALE_PATHS
-------------------------------------+-------------------------------------

Reporter: Stanislav | Owner: nobody
Type: Bug | Status: new
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Jul 29, 2017, 11:52:42 AM7/29/17
to django-...@googlegroups.com
#28434: JavaScriptCatalog and JSONCatalog don't contain translatations from
LOCALE_PATHS
-------------------------------------+-------------------------------------
Reporter: Stanislav | Owner: nobody
Type: Bug | Status: closed
Component: | Version: 1.11
Internationalization |
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* 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>

Reply all
Reply to author
Forward
0 new messages