如何使用python更新gettext模块中的.po和.pot文件

问题描述 投票:-2回答:1

[我使用get text模块创建了语言翻译,现在我在文件中添加了更多字符串,我运行了该程序,早期的字符串正在转换并且剩余的字符串未翻译。任何人都可以告诉我如何更新.pot,.po和.mo文件(使用Linux中的获取文本模块)

enter image description here

python internationalization gettext
1个回答
0
投票
我如何使用中的获取文本模块更新.pot,.po和.mo文件Linux?

使用xgettext从Python代码生成POT文件:

https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#xgettext-Invocation

使用msgmerge从新的POT文件更新现有的PO文件:

https://www.gnu.org/software/gettext/manual/html_node/msgmerge-Invocation.html#msgmerge-Invocation

使用msgfmt将PO文件编译成MO文件:

https://www.gnu.org/software/gettext/manual/html_node/msgfmt-Invocation.html#msgfmt-Invocation

© www.soinside.com 2019 - 2024. All rights reserved.