| 1 |
# Translation Guide |
| 2 |
|
| 3 |
To start translating, create a fork of this repository. |
| 4 |
|
| 5 |
## .ts file |
| 6 |
In the `/translations` folder, you'll see several files with the extension `.ts`. Make a copy of `dde-store.ts` or `dde-store_en.ts` and rename it to `dde-store_yourlanguagecode.ts` (Spanish = `dde-store_es.ts`, German = `dde-store_de.ts`, etc). Open the file and change the `language="en"` in the first line to match the same language code. |
| 7 |
```xml |
| 8 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="en" version="2.1"> |
| 9 |
``` |
| 10 |
|
| 11 |
Every piece of text that needs to be translated comes in a format like this: |
| 12 |
```xml |
| 13 |
<message> |
| 14 |
<location filename="../main.cpp" line="17"/> |
| 15 |
<source>Created by %1</source> |
| 16 |
<translation>Created by %1</translation> |
| 17 |
</message> |
| 18 |
``` |
| 19 |
Anything between the `<source></source>` tags is the original text. Don't change it. |
| 20 |
|
| 21 |
Anything between the `<translation></translation>` tags is what needs to be translated. |
| 22 |
|
| 23 |
See how this example says `Created by %1`? %1 is text that will the app will replace. In this case, %1 will be changed to my name. You can move around %1 to wherever is gramatically correct, just don't remove it. |
| 24 |
|
| 25 |
Some things may be repeated, like the categories or "OK". You can just copy the same translation as before. |
| 26 |
|
| 27 |
Make sure to not translate anything else like the `<context></context>` tags! |
| 28 |
|
| 29 |
## README.md |
| 30 |
Create a copy of `README.md` and rename it to `README.languagecode.md`. Delete the language selector at the top (the flags and languages) and the rest is pretty simple. Just translate it! Just don't change `DDE Store`. The name needs to stay. Once you're done, move it to `translations/README/`, and add the flag, name, and link to the main README's language selector formatted the same way as the rest. |
| 31 |
|
| 32 |
## .desktop file |
| 33 |
Edit `dde-store.desktop` and 2 new lines: `Name[languagecode]=` and the translation of "App Store", and `Comment[languagecode]=` and the same translation of "An app store for DDE built with DTK" you put in the README. Make sure the lines are inserted alphabetically by language code. |
| 34 |
|
| 35 |
|
| 36 |
If you're confused about anything, take a look at another translation to see what they changed, or just ask me. Once you're done with both files, just submit a pull request. I'll make sure everything looks fine and merge it. Thank you for taking interest in contributing! |