Translations.wiki
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--
Fix some mistakes in tag info: gtCake, gtFlamethrower, gtLandGun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
365
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     1
#summary This is a guide for new translators.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     2
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     3
= Introduction =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     4
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     5
This is a guide for translators. In order to translate Hedgewars into another language you are going to need:
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     6
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     7
 # The latest Hedgewars localization files
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     8
 # A text editor like (notepad++,geany,vim etc)
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
     9
 # Qt4 Linguist. To download the Qt4 Linguist you have to download the Qt4 SDK.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    10
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    11
= Getting the localization files =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    12
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    13
To get the Hedgewars localization files there are 4 possible ways.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    14
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    15
*A*. Clone the Hedgewars source repository.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    16
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    17
*B*. Download the latest Hedgewars source code.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    18
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    19
*C*. Find the localization files in your current Hedgewars installation.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    20
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    21
*D*. Download only the specific files to be translated.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    22
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    24
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    25
The *B* way is a lot like the *A* way but more limited.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    26
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    27
The *C* is probably the fastest way and the more convenient for the translator.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    31
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    32
Above I am going to discuss the *C* way (Find the localization files in your current Hedgewars installation).
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    33
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    34
== Finding the localization files ==
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    35
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    36
In Linux you have to look into /path-to-Hedgewars/Data/Locale where path-to-Hedgewars is the path to your Hedgewars installation.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    38
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    39
For example in an Arch Linux box the path is /usr/share/Hedgewars/Data/Locale.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    40
In a Windows 8 box the path is C:\Program Files (x86)\Hedgewars 0.9.19\Data\Locale.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    41
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    42
= Translation Files =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    43
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    45
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    46
en.txt - This is the engine's strings
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    49
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    50
missions_en.txt - This is the mission description strings
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    51
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    52
campaigns_en.txt - This is the campaign description strings
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    55
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    56
= Updating an existing translation =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    61
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    62
= Creating a new translation =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    63
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    68
Here are 3 examples:
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    69
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    70
For French copy en.txt to fr.txt
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    71
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    72
For Spanish copy en.txt to es.txt
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    73
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    74
For Greek copy en.txt to el.txt
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    75
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    76
= Testing the translations =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    77
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    78
When finished you have just to start Hedgewars and choose your language from the Game Preferences, Advanced tab.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    79
If a translation is missing then the string is going to be displayed in English.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    80
Note that you should restart the front-end for the language changes to take effect.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    81
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    82
= Sharing the translations =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    83
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    84
In order to share your translations with Hedgewars community there are 3 possible ways.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    85
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    86
A. Give them the files and tell them where to place them. Of course this is the less
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    87
convenient way but it is maybe a good approach to let other players double check your
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    88
translations.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    89
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    90
B. Talk with a Hedgewars dev in order to include it in DLC (http://Hedgewars.org/content.html)
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    91
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    92
C. Talk with a Hedgewars dev in order to include it in the next Hedgewars release.
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    93
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    94
= Things to have in mind =
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    95
54349158cbff Created wiki page about translations.
pntanasis@gmail.com
parents:
diff changeset
    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.