Translations.wiki
changeset 1024 f243d261e679
parent 976 e1ed13c13a4a
child 1034 f55656ceb224
equal deleted inserted replaced
1023:175b8ef5f6d2 1024:f243d261e679
    41 == Translation files ==
    41 == Translation files ==
    42 Here is a list of 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. The file locations are relative to the top directory of the Hedgewars source code. You can edit all these files with a text editor, but for some files special editors are available.
    42 Here is a list of 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. The file locations are relative to the top directory of the Hedgewars source code. You can edit all these files with a text editor, but for some files special editors are available.
    43 
    43 
    44 === Engine (in-game stuff) ===
    44 === Engine (in-game stuff) ===
    45  * `/share/hedgewars/Data/Locale/en.txt`—This contains the core in-game strings, such as the mission panel, the messages at the top, ammo names and descriptions
    45  * `/share/hedgewars/Data/Locale/en.txt`—This contains the core in-game strings, such as the mission panel, the messages at the top, ammo names and descriptions
    46  * `/share/hedgewars/Data/Locale/stub.lua`—Strings used by Lua scripts, which includes campaigns, missions and game styles
    46  * `/share/hedgewars/Data/Locale/stub.lua`—Strings used by Lua scripts, which includes campaigns, missions and game styles (see below)
       
    47 
       
    48 ==== .lua files ====
       
    49 In a `.lua` file you will find many lines like this:
       
    50 
       
    51 ```["Rubber Band"] = "", -- Construction_Mode```
       
    52 
       
    53 Those need to be translated. The part in square brackets is the English original text.
       
    54 The part in the quotation marks after the equals sign is supposed to contain the translation.
       
    55 The part after the two dashes is a comment to provide context. It is only present for orientation, you do not need to translate it, you can also remove it. In this example, it means that the text comes from the Construction Mode script.
       
    56 
       
    57 Example for a translated line (in Italian):
       
    58 
       
    59 ```["Rounds Complete"] = "Round Completati",```
       
    60 
       
    61 Lines which look different than the lines described above have a special meaning and must not be changed.
       
    62 In case you need to include a quotation mark in your translation, write `\"` instead of `"`.
       
    63 Lines beginning with two dashes can be ignored.
       
    64 
       
    65 Note to programmers: These `.lua` files are actually containing real Lua source code.
    47 
    66 
    48 === Frontend (main menu) ===
    67 === Frontend (main menu) ===
    49  * `/share/hedgewars/Data/Locale/hedgewars_en.ts`—Contains most strings of the frontend and you can edit it with Qt Linguist
    68  * `/share/hedgewars/Data/Locale/hedgewars_en.ts`—Contains most strings of the frontend and you can edit it with Qt Linguist
    50  * `/share/hedgewars/Data/Locale/missions_en.txt`—This is the [Missions mission] description strings
    69  * `/share/hedgewars/Data/Locale/missions_en.txt`—This is the [Missions mission] description strings
    51  * `/share/hedgewars/Data/Locale/campaigns_en.txt`—This is the campaign description strings
    70  * `/share/hedgewars/Data/Locale/campaigns_en.txt`—This is the campaign description strings