【发布时间】:2014-01-15 03:49:50
【问题描述】:
我正在尝试生成用于翻译我的 JS 字符串的 JS 目录。
按照文档,我正在尝试
$ 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
$
失败,但 makemessages 适用于 django 域。
【问题讨论】:
-
gettext,Django 和 Python 你用的是什么版本? -
GNU gettext-runtime 0.18.1, django=1.6.0, python 2.7, ubuntu 12.04 -
无法使用相同版本的 gettext、django、python (2.7.3) 和 ubuntu 重现。我建议再次检查the documentation。您能否发布有关您的
urls.py和已翻译的 JavaScript 文件的更多详细信息? -
我偶然发现了同样的错误消息,半小时后我发现我的应用程序中没有任何要翻译的消息。在我的应用程序中添加一个可翻译的字符串,修复它:D
-
@ThomasKremmel:谢谢,你写这个作为答案,我会接受的。我遇到了同样的错误。
标签: javascript django internationalization