bash 如何将 .po 文件编译为 .mo 文件,msgfmt 不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43149181/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Compile .po file to .mo file , msgfmt not working
提问by israel
I have to compile a file .po to .mo with msgfmt, so I installed gettext (newest version) and do chmod 777
to my entire folder.
我必须使用 msgfmt 将文件 .po 编译为 .mo,所以我安装了 gettext(最新版本)并对chmod 777
我的整个文件夹执行了操作。
When I compile the file:
当我编译文件时:
msgfmt /home/myuser/file.po -o /home/myuser/file.mo
there are no errors, no life signal, nothing.
没有错误,没有生命信号,什么都没有。
How can I solve it?
我该如何解决?
回答by user3734670
You have to change the order of your command:
您必须更改命令的顺序:
msgfmt /home/myuser/file.po -o /home/myuser/file.mo
to:
到:
msgfmt -o /home/myuser/file.mo /home/myuser/file.po
The usage of msgfmt can you get with:
msgfmt 的用法可以通过以下方式获得:
msgfmt --help