翻訳ファイルの .ts の翻訳方法

翻訳ファイルの .tsPoedit では開けない.Qt Linguist というものが使えるそうなので Debian だと wheezy-backports 以降に存在する qttools5-dev-tools を導入する.

% sudo apt install qttools5-dev-tools
% /usr/lib/x86_64-linux-gnu/qt5/bin/linguist

20150917_18:09:30-3415 🏛️

20150917_18:09:24-3340 🏛️

翻訳して保存,「ファイル」->「リリース」で .ts から .qm が作られる.これをコピーして対象アプリケーションを起動すると翻訳が反映されるはず.

% sudo cp ./retext_ja.?? /usr/share/retext/locale

<追記>
コマンドラインで変換する場合は qtchooser パッケージに含まれる lrelease が利用できる.

% lrelease ./retext_ja.ts -qm ./retext_ja.qm

若しくは同パッケージの lconvert でもok.これは qm から ts への変換や pot / po / qph / xlf にも対応している.

% lconvert -i retext_ja.ts -o retext_ja2.qm
% lconvert -if qm -i retext_ja.qm -of ts -o retext_ja2.ts

</追記>

One thought to “翻訳ファイルの .ts の翻訳方法”

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)