0

PoEdit 会导致问题,因为它还会扫描不需要扫描的子目录中的 Python 源。所以我希望 PoEdit 从 POT 文件中获取有关字符串的新信息。据说这里xgettext可以让我从源代码创建一个 POT 文件。但我不知道怎么做。它总是生成一个 PO 文件。

如何创建 POT 文件xgettext?还是旧的pygettext可以接受?还是有其他工具?

4

2 回答 2

2

Get Babel. It does just about everything you need pertaining to i18n and l10n you would need in a python project.

See also instructions for setting it up in a Setuptools/Distribute project; if you are not yet using them, I suggest you do

于 2012-05-21T22:42:04.877 回答
2

只需运行xgettext并将生成的domainname.po文件重命名为domainname.pot.

http://www.gnu.org/software/gettext/manual/html_node/Template.html#Template

于 2012-05-21T21:16:02.140 回答