使用django和xgettext进行本地化

Har*_*šić 3 django django-templates xgettext

我正在翻译我的网站,但是当我尝试运行命令时:

manage.py makemessages --locale=bs
Run Code Online (Sandbox Code Playgroud)

我经常得到如下错误:

CommandError: errors happened while running xgettext on rjsmin.py
xgettext: Non-ASCII string at .\compressor\filters\jsmin\rjsmin.py:59.
          Please specify the source encoding through --from-code.
Run Code Online (Sandbox Code Playgroud)

我做了什么外壳?

小智 7

我也有同样的问题.在rjsmin.py的顶部,将" - * - coding:ascii - * - "更改为" - * - coding:utf-8 - * - "