2

我正在尝试使用Translate Toolkit中的poswap

我的输入文件是he.po(希伯来语),我的输出文件是ar.po(阿拉伯语)

以下命令的结果poswap he.po ar.po是一个新ar.po文件,其中源是希伯来语,翻译是阿拉伯语。

但是,当我使用所有源字符串编码打开文件时poedit,不符合要求。绝对没有utf-8了。。

有没有人注意到这种行为?

4

1 回答 1

1

I had this problem before. If you open the ar.po file using a text editor, you will see there is a difference between the file headers.

That's because poswap is not converting the poedit header as well.

To solve this, just open ar.po file using any file editor and add the following to the top:

msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

Notice the "Language: ar\n" line.

This will ensure the po file will have the proper headers.

Good Luck!

于 2018-03-07T12:23:27.047 回答