Saturday, December 3, 2016

Javascript i18n - makemessages doesnt create a djangojs file.

Hey guys,

/opt/venv/bin/python ../manage.py makemessages -d djangojs -l en -l fr



Looking into debugging this further, I want to translate a few JS files but the makemessages commands fails to create the Djanjojs files. I'm using something like this :

    url(r'^jsi18n/$',
       
JavaScriptCatalog.as_view(packages=['lanets.apps.accounts',
       
'lanets.apps.administration',
       
'lanets.apps.main',
       
'lanets.apps.news',
       
'lanets.apps.store',
       
'lanets.apps.tickets',
       
'lanets.apps.tournaments',
       
'lanets.apps.faq',
       
'lanets.apps.executiveteam',
       
'lanets.apps.forums',
       
'lanets.apps.polls', ]),
        name
='javascript-catalog'),

And the JS script with the following strings:

    customText: {
        headerText
: gettext('How can we help?'),
        inputPlaceholder
: gettext('Type a message...'),
        sendButtonText
: gettext('Send'),
   
},

I do get

processing locale en
processing locale fr

But no djangojs files anywhere.

--
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+unsubscribe@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/69c890e7-6919-40d5-a06c-5732655a62b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment