Re: JavaScriptCatalog: it's big or not?

39 views
Skip to first unread message
Message has been deleted

Tim Graham

unread,
Aug 14, 2017, 1:16:20 PM8/14/17
to Django users
Quoting Claude from https://code.djangoproject.com/ticket/28434#comment:2, "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."

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


Can anyone explain me is it a bug or a usage mistake?


Reply all
Reply to author
Forward
Message has been deleted
0 new messages