小编pub*_*her的帖子

在Django中翻译文件时使用Git命令

我在Django中有一个现有的应用程序.我想在页面上添加翻译.在页面上我有:

{% trans 'Projects'%}
Run Code Online (Sandbox Code Playgroud)

在.po文件中我添加了:

#: templates/staff/site.html: 200
msgid "Projects"
msgid "Projekty"
Run Code Online (Sandbox Code Playgroud)

然后执行命令:

django-admin.py compilemessages -l pl
Run Code Online (Sandbox Code Playgroud)

执行此命令后,出现错误:

CommandError: This Should Be Run script from the Django Git checkout or your project or app tree, or with the settings Specified module.
Run Code Online (Sandbox Code Playgroud)

python django translation

4
推荐指数
2
解决办法
2842
查看次数

标签 统计

django ×1

python ×1

translation ×1