Javascript i18n - makemessages doesnt create a djangojs file.

23 views
Skip to first unread message

Laurent Dumont

unread,
Dec 3, 2016, 9:54:49 AM12/3/16
to Django users
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.
Reply all
Reply to author
Forward
0 new messages