Localization with django and xgettext

回眸只為那壹抹淺笑 提交于 2019-12-10 10:16:38

问题


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

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