Skip to content
Jan 31 / Sunng

翻译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

参考:

Similar Posts:

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word