本地化与django和xgettext [英] Localization with django and xgettext

查看:193
本文介绍了本地化与django和xgettext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am working on translation of my site, but when I try to run command:

manage.py makemessages --locale=bs

我经常收到错误,如:

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.

我做什么shell?

推荐答案

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

I have the same problem. At the top of the rjsmin.py, change the "- * - coding: ascii -*-" to "- * - coding: utf-8 - * -"

这篇关于本地化与django和xgettext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆