问题
I am working on translation of my site, but when I try to run command:
manage.py makemessages --locale=bs
I constantly get error like:
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.
What shell I do?
回答1:
I have the same problem. At the top of the rjsmin.py, change the "- * - coding: ascii -*-" to "- * - coding: utf-8 - * -"
来源:https://stackoverflow.com/questions/20955811/localization-with-django-and-xgettext