Unable to generate django javascript i18n catalog

早过忘川 提交于 2019-12-10 14:54:19

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/20802624/unable-to-generate-django-javascript-i18n-catalog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!