Translating » History » Version 4
pennywise, 08/31/2009 02:59 PM
1 | 1 | pennywise | h1. Translating |
---|---|---|---|
2 | 1 | pennywise | |
3 | 3 | pennywise | If you want to help to translate quassel to your language, here is a quick howto. |
4 | 3 | pennywise | |
5 | 3 | pennywise | h2. German |
6 | 3 | pennywise | |
7 | 3 | pennywise | See [[Translating/German]] for further information. |
8 | 3 | pennywise | |
9 | 3 | pennywise | h2. HowTo |
10 | 1 | pennywise | |
11 | 1 | pennywise | In order to create or update a translatable file, run the following command in the directory i18n/: |
12 | 1 | pennywise | |
13 | 4 | pennywise | lupdate ../src -ts quassel_xx.ts -no-obsolete |
14 | 1 | pennywise | |
15 | 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). |
16 | 2 | pennywise | |
17 | 2 | pennywise | HINT: In Kubuntu it's in the _qt4-dev-tools_ package and you should use _lupdate-qt4_ |
18 | 2 | pennywise | |
19 | 2 | pennywise | Quassel will automatically load these translation files based on the system locale. Examples for valid file names: |
20 | 1 | pennywise | |
21 | 1 | pennywise | <pre> |
22 | 1 | pennywise | quassel_de.ts |
23 | 1 | pennywise | quassel_en_US.ts |
24 | 1 | pennywise | </pre> |
25 | 1 | pennywise | |
26 | 1 | pennywise | You can open these XML files with the Qt Linguist and add/edit translated strings. |
27 | 1 | pennywise | |
28 | 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). |
29 | 1 | pennywise | |
30 | 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 |
31 | 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 |
32 | 1 | pennywise | codes as explained above. |
33 | 1 | pennywise | |
34 | 1 | pennywise | NOTE: You'll need lrelease installed with your Qt in order to generate |
35 | 1 | pennywise | translation files. Some distributions don't package that tool; |
36 | 1 | pennywise | in that case you won't get translations. |
37 | 1 | pennywise | |
38 | 1 | pennywise | This is directly copied from the README file inside the i18n directory. |