在virtualenv中安装的应用程序的makemessages [英] makemessages for an app installed in virtualenv
问题描述
我已将Django应用程序安装到我的virtualenv,我想为该应用添加额外的翻译。
I've installed a Django App to my virtualenv, and I would like to add extra translations to that App.
是否可以从应用程序安装在我的项目的 locale / pt / LC_MESSAGES
文件夹中的一个virtualenv到我的django.po中。
Is it possible to import the messages from an app installed in a virtualenv to my django.po in my project's locale/pt/LC_MESSAGES
folder?
我应该翻译第三方应用程序吗?如果是这样,如何使用 makemessages
在安装在virtualenv中的应用程序中生成消息?
Alternatively, should I translate the 3rd party app? If so, how can I use makemessages
to generate the messages in the app installed in the virtualenv?
推荐答案
在我的项目目录中,我在virtualenv中为应用程序创建了一个(临时)符号链接,然后运行makemessages命令,如:
Within my project directory I make a (temporary) symlink to the app in my virtualenv and then I run the makemessages command like:
。 ./manage.py makemessages -l nl --symlinks
../manage.py makemessages -l nl --symlinks
创建* .po文件后,我删除符号链接..
After the *.po files is created I remove the symlink..
这篇关于在virtualenv中安装的应用程序的makemessages的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!