2010-01-27 18 views
7

打印:为什么我不能用 'django-admin.py makemessages -l CN'

D:\zjm_code\register2>python D:\Python25\Lib\site-packages\django\bin\django-adm 
in.py makemessages -l cn 
Error: This script should be run from the Django SVN tree or your project or app 
tree. If you did indeed run it from the SVN checkout or your project or applica 
tion, maybe you are just missing the conf/locale (in the django tree) or locale 
(for project and application) directory? It is not created automatically, you ha 
ve to create it by hand if you want to enable i18n for your project or applicati 
on. 

2.我做了一个区域设置目录,

D:\zjm_code\register2>python D:\Python25\Lib\site-packages\django\bin\django-adm 
in.py makemessages -l cn 
processing language cn 
Error: errors happened while running xgettext on __init__.py 
'xgettext' 不是内部或外部命令,也不是可运行的程序 
或批处理文件。 

D:\Python25\lib\site-packages\django\core\management\base.py:234: RuntimeWarning 
: tp_compare didn't return -1 or -2 for exception 
    sys.exit(1) 

3. 确定

http://hi.baidu.com/zjm1126/blog/item/f28e09deced15353ccbf1a82.html

回答

8
  1. register2您的项目或应用程序树?
  2. 你做目录register2\\locale
+0

喜,亚历克斯,我改变的问题,帮我havae一看,请 – zjm1126 2010-01-27 04:39:24

+0

@zjm,我显然与我2点解决了你原来的问题,现在你开始有中国特色的一些完全不同的错误,我甚至无法读取,我无法帮助(看起来你的'__init __。py'中有非Ascii部分,如果是这样,那么我建议你不要这样做 - 但这是我的猜测)。 – 2010-01-27 05:08:30

+0

我有创建的语言环境文件夹,但我得到这个错误:'CommandError:错误运行xgettext。请注意,Django国际化需要GNU gettext 0.15或更高版本。“我不确定这是否会成为一个新问题,但是您是否有任何线索知道如何在Windows上安装GNU gettext? (谷歌并不知道:[ – shailenTJ 2013-08-10 16:58:42