Translating » History » Version 1
pennywise, 08/13/2009 04:55 PM
| 1 | 1 | pennywise | h1. Translating |
|---|---|---|---|
| 2 | 1 | pennywise | |
| 3 | 1 | pennywise | If you want 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 | 1 | 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). Quassel will automatically load these translation files based on the system locale. Examples for valid file names: |
| 10 | 1 | pennywise | |
| 11 | 1 | pennywise | <pre> |
| 12 | 1 | pennywise | quassel_de.ts |
| 13 | 1 | pennywise | quassel_en_US.ts |
| 14 | 1 | pennywise | </pre> |
| 15 | 1 | pennywise | |
| 16 | 1 | pennywise | You can open these XML files with the Qt Linguist and add/edit translated strings. |
| 17 | 1 | pennywise | |
| 18 | 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). |
| 19 | 1 | pennywise | |
| 20 | 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 |
| 21 | 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 |
| 22 | 1 | pennywise | codes as explained above. |
| 23 | 1 | pennywise | |
| 24 | 1 | pennywise | NOTE: You'll need lrelease installed with your Qt in order to generate |
| 25 | 1 | pennywise | translation files. Some distributions don't package that tool; |
| 26 | 1 | pennywise | in that case you won't get translations. |
| 27 | 1 | pennywise | |
| 28 | 1 | pennywise | This is directly copied from the README file inside the i18n directory. |