aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains_train_subway
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_subway
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_subway')
-rw-r--r--advtrains/advtrains_train_subway/init.lua8
-rw-r--r--advtrains/advtrains_train_subway/locale/de.txt2
2 files changed, 9 insertions, 1 deletions
diff --git a/advtrains/advtrains_train_subway/init.lua b/advtrains/advtrains_train_subway/init.lua
index 85bd28f..53e0a70 100644
--- a/advtrains/advtrains_train_subway/init.lua
+++ b/advtrains/advtrains_train_subway/init.lua
@@ -1,3 +1,9 @@
+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("subway_wagon", {
mesh="advtrains_subway_wagon.b3d",
@@ -31,7 +37,7 @@ advtrains.register_wagon("subway_wagon", {
-- atprint("subway custom_on_activate")
-- self.object:set_animation({x=1,y=80}, 15, 0, true)
--end,
-}, "Subway Passenger Wagon", "advtrains_subway_wagon_inv.png")
+}, S("Subway Passenger Wagon"), "advtrains_subway_wagon_inv.png")
--wagons
minetest.register_craft({
diff --git a/advtrains/advtrains_train_subway/locale/de.txt b/advtrains/advtrains_train_subway/locale/de.txt
new file mode 100644
index 0000000..4aceebd
--- /dev/null
+++ b/advtrains/advtrains_train_subway/locale/de.txt
@@ -0,0 +1,2 @@
+Default Seat (driver stand) = Standardsitzplatz (Führerstand)
+Subway Passenger Wagon = U-Bahn-Waggon \ No newline at end of file