Project

General

Profile

Translating » History » Version 2

pennywise, 08/13/2009 05:17 PM

1 1 pennywise
h1. Translating
2 1 pennywise
3 2 pennywise
If you want to help to translate quassel to your language, here is a quick howto:
4 1 pennywise
5 1 pennywise
In order to create or update a translatable file, run the following command in the directory i18n/:
6 1 pennywise
7 1 pennywise
  lupdate ../src -ts quassel_xx.ts
8 1 pennywise
9 2 pennywise
where xx is the two-letter language code according to ISO 639 (which, if needed, may be suffixed by a country code according to ISO 3166).
10 2 pennywise
11 2 pennywise
HINT: In Kubuntu it's in the _qt4-dev-tools_ package and you should use _lupdate-qt4_
12 2 pennywise
13 2 pennywise
Quassel will automatically load these translation files based on the system locale. Examples for valid file names:
14 1 pennywise
15 1 pennywise
<pre>
16 1 pennywise
quassel_de.ts
17 1 pennywise
quassel_en_US.ts
18 1 pennywise
</pre>
19 1 pennywise
20 1 pennywise
You can open these XML files with the Qt Linguist and add/edit translated strings.
21 1 pennywise
22 1 pennywise
The *.ts files can and should be kept in sync with the source code by running lupdate regularly (existing translations won't be removed).
23 1 pennywise
24 1 pennywise
Qt itself does not use the _*.ts_ files, but a compact binary format (_*.qm_). These files will automatically be generated at build time. By default, all
25 1 pennywise
languages will be built. To select languages, add -DLINGUAS="<languages>" to your cmake call, where <languages> is a space-separated list of language
26 1 pennywise
codes as explained above. 
27 1 pennywise
28 1 pennywise
NOTE: You'll need lrelease installed with your Qt in order to generate
29 1 pennywise
      translation files. Some distributions don't package that tool;
30 1 pennywise
      in that case you won't get translations.
31 1 pennywise
32 1 pennywise
This is directly copied from the README file inside the i18n directory.