Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to generate django javascript i18n catalog

I am trying to generate the JS catalog for translating my JS strings.

Folowing the docs, I am trying

$ django-admin.py makemessages -d djangojs -l de
processing locale de
CommandError: errors happened while running msguniq
msguniq: error while opening "[project_root]/locale/djangojs.pot" for reading: No such file or directory
$ man msguniq
$ django-admin.py makemessages -d django -l de
processing locale de
$ 

Which fails, but makemessages works for django domain.

like image 712
shabda Avatar asked Dec 27 '13 14:12

shabda


1 Answers

The problem was that there was no string to be translated (the error message could be better!). Adding a translatable string (e.g. {% trans 'dummy' %}) fixed it.

Another problem could be outdated gettext version, try upgrading it:

apt-get install gettext
like image 143
niekas Avatar answered Sep 25 '22 01:09

niekas