Translations: Explain .lua files
authorWuzzy
Wed, 20 Sep 2017 17:22:39 +0100
changeset 1024 f243d261e679
parent 1023 175b8ef5f6d2
child 1025 e6c3e90f2373
Translations: Explain .lua files
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