翻译po

翻译一个po文件。确认安装了gettext工具包。

cd到po目录,创建pot
intltool-update –pot

创建相应的语言文件,例如zh_CN
msginit -l zh_CN.utf8

程序会提示选择或输入邮箱,之后就会生成zh_CN.po文件,打开文件,逐条编辑msgstr即可。

手动编辑LINGUAS文件,按顺序将zh_CN添加到其中。

可以通过这个命令查看翻译的进度
msgfmt -cv zh_CN.po

对于更新pot更新的情况,可以使用命令更新po文件
intltool-update zh_CN

参考:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>