Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert GNU Gettext .po files to Qt's .ts files?

Is there a tool to convert the translations in GNU Gettext .po format into Qt's native .ts format?

like image 689
v_2e Avatar asked Aug 24 '12 12:08

v_2e


2 Answers

You could use po2ts which is meant for exactly this task. It is part of the Translate Toolkit which you can download for your appropriate platform.

like image 132
Bart Avatar answered Nov 20 '22 15:11

Bart


Today I found that it could be done using the lconvert tool that comes with the Qt distribution and had already been present on my system.

So I simply did

lconvert -locations relative <file>.po -o <file>.ts

It also supports the backward conversion:

lconvert <file>.ts -o <file>.po
like image 40
v_2e Avatar answered Nov 20 '22 15:11

v_2e