From fac8b518c940176f4d644638b1c801c2c113f872 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Mon, 23 Jan 2017 21:29:59 +0100 Subject: Add intllib support and German translation --- advtrains/advtrains_train_subway/init.lua | 8 +++++++- advtrains/advtrains_train_subway/locale/de.txt | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 advtrains/advtrains_train_subway/locale/de.txt (limited to 'advtrains/advtrains_train_subway') 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 -- cgit v1.2.3