author | almikes@aol.com |
Wed, 03 Dec 2014 19:08:24 +0000 | |
changeset 423 | 0b62abc50ac3 |
parent 368 | 2982cf17f347 |
child 496 | 24ffc984d617 |
permissions | -rw-r--r-- |
365 | 1 |
#summary This is a guide for new translators. |
2 |
||
3 |
= Introduction = |
|
4 |
||
5 |
This is a guide for translators. In order to translate Hedgewars into another language you are going to need: |
|
6 |
||
7 |
# The latest Hedgewars localization files |
|
8 |
# A text editor like (notepad++,geany,vim etc) |
|
9 |
# Qt4 Linguist. To download the Qt4 Linguist you have to download the Qt4 SDK. |
|
10 |
||
11 |
= Getting the localization files = |
|
12 |
||
13 |
To get the Hedgewars localization files there are 4 possible ways. |
|
14 |
||
15 |
*A*. Clone the Hedgewars source repository. |
|
16 |
||
17 |
*B*. Download the latest Hedgewars source code. |
|
18 |
||
19 |
*C*. Find the localization files in your current Hedgewars installation. |
|
20 |
||
21 |
*D*. Download only the specific files to be translated. |
|
22 |
||
23 |
The *A* is maybe the most convenient way to include the translations in the next Hedgewars release as you can easily produce a patch to provide it to the Hedgewars developers. Note that a fast internet connection is desired as you probably will clone the whole game sources. The other advantage of this way is that it can be used to translate the latest game version that is going to be released. |
|
24 |
||
25 |
The *B* way is a lot like the *A* way but more limited. |
|
26 |
||
27 |
The *C* is probably the fastest way and the more convenient for the translator. |
|
28 |
However, it has the limitation that one can only translate the most recent Hedgewars release (the one currently installed) and not the version that is going to be released. |
|
29 |
||
366
a290ff43c897
Edited wiki page Translations through web user interface. Changed google code link to serve raw files.
pntanasis@gmail.com
parents:
365
diff
changeset
|
30 |
The *D* way is to download the desired files from [http://hedgewars.googlecode.com/hg/share/hedgewars/Data/Locale/ here]. |
365 | 31 |
|
32 |
Above I am going to discuss the *C* way (Find the localization files in your current Hedgewars installation). |
|
33 |
||
34 |
== Finding the localization files == |
|
35 |
||
36 |
In Linux you have to look into /path-to-Hedgewars/Data/Locale where path-to-Hedgewars is the path to your Hedgewars installation. |
|
37 |
In Windows you have to look into c:\path-to-Hedgewars\share\Hedgewars\Data\Locale where path-to-Hedgewars is the path to your Hedgewars installation. |
|
38 |
||
39 |
For example in an Arch Linux box the path is /usr/share/Hedgewars/Data/Locale. |
|
40 |
In a Windows 8 box the path is C:\Program Files (x86)\Hedgewars 0.9.19\Data\Locale. |
|
41 |
||
42 |
= Translation Files = |
|
43 |
||
44 |
I am going to list the different localization files of the English language that you should use as your translation reference/template as it should be the most accurate and up to date. |
|
45 |
||
46 |
en.txt - This is the engine's strings |
|
47 |
||
367
1a14a7fc4b7a
Edited wiki page Translations through web user interface. s/qm/ts/
pntanasis@gmail.com
parents:
366
diff
changeset
|
48 |
hedgewars_en.ts - This is the front-end's strings and you can edit it with Qt Linguist |
365 | 49 |
|
50 |
missions_en.txt - This is the mission description strings |
|
51 |
||
52 |
campaigns_en.txt - This is the campaign description strings |
|
53 |
||
368
2982cf17f347
Edited wiki page Translations through web user interface. Mention stub.lua
pntanasis@gmail.com
parents:
367
diff
changeset
|
54 |
stub.lua - This is all the lua files (missions,maps etc) strings |
365 | 55 |
|
56 |
= Updating an existing translation = |
|
57 |
||
367
1a14a7fc4b7a
Edited wiki page Translations through web user interface. s/qm/ts/
pntanasis@gmail.com
parents:
366
diff
changeset
|
58 |
That is relatively easy. Just edit the existing file. You can edit every file with your favorite editor and the .ts file with Qt Linguist. |
365 | 59 |
|
368
2982cf17f347
Edited wiki page Translations through web user interface. Mention stub.lua
pntanasis@gmail.com
parents:
367
diff
changeset
|
60 |
The en.lua file doesn't exist. The strings are hard coded in the code. |
365 | 61 |
|
62 |
= Creating a new translation = |
|
63 |
||
64 |
That is easy too. Make a copy of the English file and rename it to use the initials of your language. |
|
368
2982cf17f347
Edited wiki page Translations through web user interface. Mention stub.lua
pntanasis@gmail.com
parents:
367
diff
changeset
|
65 |
|
2982cf17f347
Edited wiki page Translations through web user interface. Mention stub.lua
pntanasis@gmail.com
parents:
367
diff
changeset
|
66 |
The en.lua file doesn't exist. Use stub.lua instead as your template. |
2982cf17f347
Edited wiki page Translations through web user interface. Mention stub.lua
pntanasis@gmail.com
parents:
367
diff
changeset
|
67 |
|
365 | 68 |
Here are 3 examples: |
69 |
||
70 |
For French copy en.txt to fr.txt |
|
71 |
||
72 |
For Spanish copy en.txt to es.txt |
|
73 |
||
74 |
For Greek copy en.txt to el.txt |
|
75 |
||
76 |
= Testing the translations = |
|
77 |
||
78 |
When finished you have just to start Hedgewars and choose your language from the Game Preferences, Advanced tab. |
|
79 |
If a translation is missing then the string is going to be displayed in English. |
|
80 |
Note that you should restart the front-end for the language changes to take effect. |
|
81 |
||
82 |
= Sharing the translations = |
|
83 |
||
84 |
In order to share your translations with Hedgewars community there are 3 possible ways. |
|
85 |
||
86 |
A. Give them the files and tell them where to place them. Of course this is the less |
|
87 |
convenient way but it is maybe a good approach to let other players double check your |
|
88 |
translations. |
|
89 |
||
90 |
B. Talk with a Hedgewars dev in order to include it in DLC (http://Hedgewars.org/content.html) |
|
91 |
||
92 |
C. Talk with a Hedgewars dev in order to include it in the next Hedgewars release. |
|
93 |
||
94 |
= Things to have in mind = |
|
95 |
||
96 |
If you are going to make a translation for a next Hedgewars release strings may not be frozen yet and change before the release. Better ask in irc in cases like that. |