aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains_train_industrial
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-01-23 21:29:59 +0100
committerorwell96 <mono96.mml@gmail.com>2017-01-23 21:29:59 +0100
commitfac8b518c940176f4d644638b1c801c2c113f872 (patch)
tree6eca418e83f45e9650086a3ec88d7b957e676f07 /advtrains/advtrains_train_industrial
parent795065979874a976f27f4711968ea17c79a97f2b (diff)
downloadadvtrains-fac8b518c940176f4d644638b1c801c2c113f872.tar.gz
advtrains-fac8b518c940176f4d644638b1c801c2c113f872.tar.bz2
advtrains-fac8b518c940176f4d644638b1c801c2c113f872.zip
Add intllib support and German translation
Diffstat (limited to 'advtrains/advtrains_train_industrial')
-rw-r--r--advtrains/advtrains_train_industrial/init.lua18
-rw-r--r--advtrains/advtrains_train_industrial/locale/de.txt5
2 files changed, 18 insertions, 5 deletions
diff --git a/advtrains/advtrains_train_industrial/init.lua b/advtrains/advtrains_train_industrial/init.lua
index 379832c..8b13cfe 100644
--- a/advtrains/advtrains_train_industrial/init.lua
+++ b/advtrains/advtrains_train_industrial/init.lua
@@ -1,3 +1,11 @@
+-- Boilerplate to support localized strings if intllib mod is installed.
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
+end
+
advtrains.register_wagon("engine_industrial", {
mesh="advtrains_engine_industrial.b3d",
textures = {"advtrains_engine_industrial.png"},
@@ -5,13 +13,13 @@ advtrains.register_wagon("engine_industrial", {
max_speed=20,
seats = {
{
- name="Driver Stand (left)",
+ name=S("Driver Stand (left)"),
attach_offset={x=-5, y=10, z=-10},
view_offset={x=0, y=10, z=0},
driving_ctrl_access=true,
},
{
- name="Driver Stand (right)",
+ name=S("Driver Stand (right)"),
attach_offset={x=5, y=10, z=-10},
view_offset={x=0, y=10, z=0},
driving_ctrl_access=true,
@@ -22,7 +30,7 @@ advtrains.register_wagon("engine_industrial", {
is_locomotive=true,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
drops={"default:steelblock 4"},
-}, "Industrial Train Engine", "advtrains_engine_industrial_inv.png")
+}, S("Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
advtrains.register_wagon("wagon_tank", {
mesh="advtrains_wagon_tank.b3d",
textures = {"advtrains_wagon_tank.png"},
@@ -43,7 +51,7 @@ advtrains.register_wagon("wagon_tank", {
inventory_list_sizes = {
box=8*6,
},
-}, "Industrial tank wagon", "advtrains_wagon_tank_inv.png")
+}, S("Industrial tank wagon"), "advtrains_wagon_tank_inv.png")
advtrains.register_wagon("wagon_wood", {
mesh="advtrains_wagon_wood.b3d",
textures = {"advtrains_wagon_wood.png"},
@@ -64,4 +72,4 @@ advtrains.register_wagon("wagon_wood", {
inventory_list_sizes = {
box=8*6,
},
-}, "Industrial wood wagon", "advtrains_wagon_wood_inv.png")
+}, S("Industrial wood wagon"), "advtrains_wagon_wood_inv.png")
diff --git a/advtrains/advtrains_train_industrial/locale/de.txt b/advtrains/advtrains_train_industrial/locale/de.txt
new file mode 100644
index 0000000..a45ca27
--- /dev/null
+++ b/advtrains/advtrains_train_industrial/locale/de.txt
@@ -0,0 +1,5 @@
+Driver Stand (left) = Führerstand Links
+Driver Stand (right) = Führerstand Rechts
+Industrial Train Engine = Industrielle Lokomotive
+Industrial tank wagon = Tankwaggon
+Industrial wood wagon = Holztransportwaggon \ No newline at end of file