# HG changeset patch # User Wuzzy # Date 1505924559 -3600 # Node ID f243d261e6796dbcb00cdec9eac6db3846b3265c # Parent 175b8ef5f6d2fcc5e53a59828657d2c1ef8d5b2a Translations: Explain .lua files diff -r 175b8ef5f6d2 -r f243d261e679 Translations.wiki --- a/Translations.wiki Sun Jun 18 02:43:19 2017 +0100 +++ b/Translations.wiki Wed Sep 20 17:22:39 2017 +0100 @@ -43,7 +43,26 @@ === Engine (in-game stuff) === * `/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 - * `/share/hedgewars/Data/Locale/stub.lua`—Strings used by Lua scripts, which includes campaigns, missions and game styles + * `/share/hedgewars/Data/Locale/stub.lua`—Strings used by Lua scripts, which includes campaigns, missions and game styles (see below) + +==== .lua files ==== +In a `.lua` file you will find many lines like this: + +```["Rubber Band"] = "", -- Construction_Mode``` + +Those need to be translated. The part in square brackets is the English original text. +The part in the quotation marks after the equals sign is supposed to contain the translation. +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. + +Example for a translated line (in Italian): + +```["Rounds Complete"] = "Round Completati",``` + +Lines which look different than the lines described above have a special meaning and must not be changed. +In case you need to include a quotation mark in your translation, write `\"` instead of `"`. +Lines beginning with two dashes can be ignored. + +Note to programmers: These `.lua` files are actually containing real Lua source code. === Frontend (main menu) === * `/share/hedgewars/Data/Locale/hedgewars_en.ts`—Contains most strings of the frontend and you can edit it with Qt Linguist