diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-01-23 21:29:59 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-01-23 21:29:59 +0100 |
commit | fac8b518c940176f4d644638b1c801c2c113f872 (patch) | |
tree | 6eca418e83f45e9650086a3ec88d7b957e676f07 /advtrains/advtrains_train_steam | |
parent | 795065979874a976f27f4711968ea17c79a97f2b (diff) | |
download | advtrains-fac8b518c940176f4d644638b1c801c2c113f872.tar.gz advtrains-fac8b518c940176f4d644638b1c801c2c113f872.tar.bz2 advtrains-fac8b518c940176f4d644638b1c801c2c113f872.zip |
Add intllib support and German translation
Diffstat (limited to 'advtrains/advtrains_train_steam')
-rw-r--r-- | advtrains/advtrains_train_steam/init.lua | 23 | ||||
-rw-r--r-- | advtrains/advtrains_train_steam/locale/de.txt | 6 |
2 files changed, 21 insertions, 8 deletions
diff --git a/advtrains/advtrains_train_steam/init.lua b/advtrains/advtrains_train_steam/init.lua index 22f525f..ca366db 100644 --- a/advtrains/advtrains_train_steam/init.lua +++ b/advtrains/advtrains_train_steam/init.lua @@ -1,3 +1,10 @@ +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("newlocomotive", { mesh="advtrains_engine_steam.b3d", textures = {"advtrains_engine_steam.png"}, @@ -6,13 +13,13 @@ advtrains.register_wagon("newlocomotive", { max_speed=10, seats = { { - name="Driver Stand (left)", + name=S("Driver Stand (left)"), attach_offset={x=-5, y=10, z=-10}, view_offset={x=0, y=6, 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=6, z=0}, driving_ctrl_access=true, @@ -55,7 +62,7 @@ advtrains.register_wagon("newlocomotive", { }) end, drops={"default:steelblock 4"}, -}, "Steam Engine", "advtrains_engine_steam_inv.png") +}, S("Steam Engine"), "advtrains_engine_steam_inv.png") advtrains.register_wagon("detailed_steam_engine", { mesh="advtrains_detailed_steam_engine.b3d", @@ -65,13 +72,13 @@ advtrains.register_wagon("detailed_steam_engine", { max_speed=10, seats = { { - name="Driver Stand (left)", + name=S("Driver Stand (left)"), attach_offset={x=-5, y=10, z=-10}, view_offset={x=0, y=6, 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=6, z=0}, driving_ctrl_access=true, @@ -114,7 +121,7 @@ advtrains.register_wagon("detailed_steam_engine", { }) end, drops={"default:steelblock 4"}, -}, "Detailed Steam Engine", "advtrains_engine_steam_inv.png") +}, S("Detailed Steam Engine"), "advtrains_engine_steam_inv.png") advtrains.register_wagon("wagon_default", { mesh="advtrains_passenger_wagon.b3d", @@ -147,7 +154,7 @@ advtrains.register_wagon("wagon_default", { wagon_span=3.1, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, drops={"default:steelblock 4"}, -}, "Passenger Wagon", "advtrains_wagon_inv.png") +}, S("Passenger Wagon"), "advtrains_wagon_inv.png") advtrains.register_wagon("wagon_box", { mesh="advtrains_wagon.b3d", textures = {"advtrains_wagon_box.png"}, @@ -168,7 +175,7 @@ advtrains.register_wagon("wagon_box", { inventory_list_sizes = { box=8*6, }, -}, "Box Wagon", "advtrains_wagon_box_inv.png") +}, S("Box Wagon"), "advtrains_wagon_box_inv.png") minetest.register_craft({ output = 'advtrains:newlocomotive', diff --git a/advtrains/advtrains_train_steam/locale/de.txt b/advtrains/advtrains_train_steam/locale/de.txt new file mode 100644 index 0000000..ac06e20 --- /dev/null +++ b/advtrains/advtrains_train_steam/locale/de.txt @@ -0,0 +1,6 @@ +Driver Stand (left) = Führerstand Links +Driver Stand (right) = Führerstand Rechts +Steam Engine = Dampflokomotive +Detailed Steam Engine = detaillierte Dampflokomotive +Passenger Wagon = Passagierwaggon +Box wagon = Güterwaggon
\ No newline at end of file |