File: CONTRIBUTING.md

package info (click to toggle)
turing 0.11-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,340 kB
  • sloc: python: 106,582; xml: 101; makefile: 53; sh: 29
file content (33 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Contributing to Turing

## Code

just make good code

follow pep8 and everything will be good

## Translation

Translators must use Qt Linguist. It can be obtained by installing the Qt toolkit.

### Editing an existing language

Just open the .ts file in Linguist and change what needs to be changed.

### Adding a new language

First, create a new .ts file in /src/lang/ using the following template:

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE TS><TS version="2.0" language="LANGUAGE CODE" sourcelanguage="en">
    <context>
    </context>
    </TS>

Replace `LANGUAGE CODE` by the ISO code of the language. If the language is "generic", use the short code (example: French `fr`, German `de`, Spanish `es`), but if it's not, use the full code (example: Simplified Chinese `zh-Hans`, Traditional Chinese `zh-Hant`).

Then, download the [FatCow Hosting Icons pack](http://www.fatcow.com/free-icons), find the corresponding flag in the 16x16 folder. Rename it to the language code you used for the .ts file (example: fr.png, de.png, zh-Hans.png) and put that in the /src/media/lang/ folder. 

Open a command prompt in /src/ and run tools/compile-gui (make sure that the CWD is /src/). 

Then, open /src/turing.qrc in Qt Creator and add /src/lang/LANGUAGE.qm and /src/media/lang/LANGUAGE.png under the /lang prefix. Save, and use /src/run to test and make sure everything works.