Battalion: Make mutated hog names translatable
authorWuzzy <almikes@aol.com>
Sun, 14 May 2017 16:57:05 +0200
changeset 12420 bdf81e6c00eb
parent 12419 6944a9161cdb
child 12421 a0c655e38cc8
Battalion: Make mutated hog names translatable
share/hedgewars/Data/Locale/de.lua
share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua
--- a/share/hedgewars/Data/Locale/de.lua	Sun May 14 16:29:51 2017 +0200
+++ b/share/hedgewars/Data/Locale/de.lua	Sun May 14 16:57:05 2017 +0200
@@ -1820,5 +1820,16 @@
 ["Congratulations! You have destroyed all targets within the time."]="Gratulation! Du hast alle Ziele innerhalb der verfügbaren Zeit ausgeschaltet.",
 ["You have finished the target practice!"]="Du hast die Zielübung abgeschlossen!",
 ["Your accuracy was %.1f%% (+%d points)."]="Deine Treffgenauigkeit betrug %.1f%% (+%d Punkte).",
-["You had %.1fs remaining on the clock (+%d points)."]="Du hattest eine verbleibende Zeit von %.1fs (+%d Punkte)."
+["You had %.1fs remaining on the clock (+%d points)."]="Du hattest eine verbleibende Zeit von %.1fs (+%d Punkte).",
+["Rifleman"]="Schütze",
+["Scientist"]="Wissenschaftler",
+["Pyromancer"]="Feuermacher",
+["Air General"]="Luftkommandant",
+["Warrior"]="Krieger",
+["Builder"]="Baumeister",
+["King"]="König",
+["Athlete"]="Athlet",
+["Medic"]="Sanitäter",
+["Hunter"]="Jäger",
+["Knight"]="Ritter",
 }
--- a/share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua	Sun May 14 16:29:51 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua	Sun May 14 16:57:05 2017 +0200
@@ -54,6 +54,7 @@
 
 varName = "Pyromancer"
 variants[varName] = {}
+variants[varName]["name"] = loc("Pyromancer")
 variants[varName]["chance"] = 7
 variants[varName]["hat"] = "Gasmask"
 variants[varName]["hp"] = 70
@@ -66,6 +67,7 @@
 
 varName = "Builder"
 variants[varName] = {}
+variants[varName]["name"] = loc("Builder")
 variants[varName]["chance"] = 10
 variants[varName]["hat"] = "constructor"
 variants[varName]["hp"] = 100
@@ -78,6 +80,7 @@
 
 varName = "Rifleman"
 variants[varName] = {}
+variants[varName]["name"] = loc("Rifleman")
 variants[varName]["chance"] = 7
 variants[varName]["hat"] = "Sniper"
 variants[varName]["hp"] = 70
@@ -90,6 +93,7 @@
 
 varName = "Warrior"
 variants[varName] = {}
+variants[varName]["name"] = loc("Warrior")
 variants[varName]["chance"] = 12
 variants[varName]["hat"] = "spartan"
 variants[varName]["hp"] = 120
@@ -102,6 +106,7 @@
 
 varName = "Chef"
 variants[varName] = {}
+variants[varName]["name"] = loc("Chef")
 variants[varName]["chance"] = 7
 variants[varName]["hat"] = "chef"
 variants[varName]["hp"] = 70
@@ -114,6 +119,7 @@
 
 varName = "Medic"
 variants[varName] = {}
+variants[varName]["name"] = loc("Medic")
 variants[varName]["chance"] = 12
 variants[varName]["hat"] = "war_desertmedic"
 variants[varName]["hp"] = 120
@@ -126,6 +132,7 @@
 
 varName = "Ninja"
 variants[varName] = {}
+variants[varName]["name"] = loc("Ninja")
 variants[varName]["chance"] = 8
 variants[varName]["hat"] = "NinjaTriangle"
 variants[varName]["hp"] = 80
@@ -138,6 +145,7 @@
 
 varName = "Athlete"
 variants[varName] = {}
+variants[varName]["name"] = loc("Athlete")
 variants[varName]["chance"] = 8
 variants[varName]["hat"] = "footballhelmet"
 variants[varName]["hp"] = 80
@@ -150,6 +158,7 @@
 
 varName = "Scientist"
 variants[varName] = {}
+variants[varName]["name"] = loc("Scientist")
 variants[varName]["chance"] = 7
 variants[varName]["hat"] = "doctor"
 variants[varName]["hp"] = 80
@@ -162,6 +171,7 @@
 
 varName = "Air General"
 variants[varName] = {}
+variants[varName]["name"] = loc("Air General")
 variants[varName]["chance"] = 5
 variants[varName]["hat"] = "war_desertofficer"
 variants[varName]["hp"] = 50
@@ -174,6 +184,7 @@
 
 varName = "Hunter"
 variants[varName] = {}
+variants[varName]["name"] = loc("Hunter")
 variants[varName]["chance"] = 10
 variants[varName]["hat"] = "Skull"
 variants[varName]["hp"] = 100
@@ -186,6 +197,7 @@
 
 varName = "King"
 variants[varName] = {}
+variants[varName]["name"] = loc("King")
 variants[varName]["chance"] = 3
 variants[varName]["hat"] = "crown"
 variants[varName]["hp"] = 60
@@ -198,6 +210,7 @@
 
 varName = "Knight"
 variants[varName] = {}
+variants[varName]["name"] = loc("Knight")
 variants[varName]["chance"] = 0
 variants[varName]["hat"] = "knight"
 variants[varName]["hp"] = 80
@@ -625,7 +638,7 @@
 function MutateHog(hog)
   local var = getHogInfo(hog, 'variant')
 
-  SetHogName(hog, var)
+  SetHogName(hog, variants[var]["name"])
   SetHogHat(hog, variants[var]["hat"])
 end