Generating a Translation (.ts) File


Qt provides tools for generating translation files. This is discussed both with Qt's documentation and in other documents for xTuple. Because of the way the project files are organized it is not obvious on how to use Qt's lupdate tool to create or update a translation file. This document briefly discusses the steps to overcome this. There are still some potential problems, foremost that openrpt is not included in the translation.

To start we need to generate a project file that lupdate can use to process the code. This file must include all the source files in one project file and since this can change over time it is best and easy to generate the file when needed. To generate the file you may use qmake. The following command generates a project file that is usable for our needs and should be run in the projects top level directory, xtuple for example.

qmake -project -o

Now that we have a project file called we can run lupdate to update all the existing translation files that are in the code directories. If you want to add a new file you can edit the file and add the required files to the list at the bottom of the project file.

Fulvia's picture
Joined: 04/07/2010
Translation into Portuguese


Estou usando um 3.4.0 EX-tupla e eu preciso tranlate em Português-Brasil, mas eu don''t saber como fazer isso.
É uma versão gratuita.
Por favor, eu preciso de sua ajuda.


sdifiore's picture
Joined: 10/21/2009

Hi Pierce,

The example you gave, it's for Linux, isn't it?

Do you happens to know the equivalent for Windows.

I have the whole Qt installed, and I don't thing I can do the way you put it.