Make mod translatable (MT 5.0.0)

This commit is contained in:
Wuzzy 2019-08-23 08:24:21 +02:00
parent 64ed5bf5b9
commit 418f1aa24e
2 changed files with 18 additions and 9 deletions

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_window")
-- Window Block
local sfx
@ -6,8 +8,8 @@ if minetest.get_modpath("default") then
end
minetest.register_node("mesecons_window:window_closed", {
description="Mesecon Window",
_doc_items_longdesc = "A Mesecon receptor which is opaque when it isn't powered and is fully transparent to light and sunlight when powered.",
description=S("Mesecon Window"),
_doc_items_longdesc = S("A Mesecon receptor which is opaque when it isn't powered and is fully transparent to light and sunlight when powered."),
tiles = {"mesecons_window_window_closed.png"},
is_ground_content = false,
groups = {cracky=3, oddly_breakable_by_hand=3},
@ -27,7 +29,7 @@ minetest.register_node("mesecons_window:window_closed", {
})
minetest.register_node("mesecons_window:window_open", {
description="Mesecon Window",
description=S("Mesecon Window"),
_doc_items_create_entry = false,
drawtype = "glasslike_framed",
sunlight_propagates = true,
@ -59,9 +61,9 @@ minetest.register_node("mesecons_window:window_open", {
})
minetest.register_node("mesecons_window:filter_closed", {
description="Mesecon Filter Window",
description=S("Mesecon Filter Window"),
tiles = {"mesecons_window_filter_closed.png"},
_doc_items_longdesc = "A Mesecon receptor which is opaque when it isn't powered and is semi-transparent to light when powered.",
_doc_items_longdesc = S("A Mesecon receptor which is opaque when it isn't powered and is semi-transparent to light when powered."),
is_ground_content = false,
groups = {cracky=3, oddly_breakable_by_hand=3},
sounds = sfx,
@ -80,7 +82,7 @@ minetest.register_node("mesecons_window:filter_closed", {
})
minetest.register_node("mesecons_window:filter_open", {
description="Mesecon Filter Window",
description=S("Mesecon Filter Window"),
drawtype = "glasslike_framed",
_doc_items_create_entry = false,
sunlight_propagates = false,
@ -112,8 +114,8 @@ minetest.register_node("mesecons_window:filter_open", {
})
minetest.register_node("mesecons_window:filter2_closed", {
description="Mesecon Filter Glass",
_doc_items_longdesc = "A Mesecon receptor which lets light through. When not powered, it is semi-transparent, i.e. it is transparent to light, but filters out sunlight. When powered, it is fully transparent to light and sunlight.",
description=S("Mesecon Filter Glass"),
_doc_items_longdesc = S("A Mesecon receptor which lets light through. When not powered, it is semi-transparent, i.e. it is transparent to light, but filters out sunlight. When powered, it is fully transparent to light and sunlight."),
drawtype="glasslike_framed",
tiles = {"mesecons_window_filter2_closed.png", "mesecons_window_filter2_closed_detail.png"},
is_ground_content = false,
@ -143,7 +145,7 @@ minetest.register_node("mesecons_window:filter2_closed", {
})
minetest.register_node("mesecons_window:filter2_open", {
description="Mesecon Filter Glass",
description=S("Mesecon Filter Glass"),
_doc_items_create_entry = false,
drawtype = "glasslike_framed",
sunlight_propagates = false,

7
locale/template.txt Normal file

@ -0,0 +1,7 @@
# textdomain: mesecons_window
Mesecon Window=
A Mesecon receptor which is opaque when it isn't powered and is fully transparent to light and sunlight when powered.=
Mesecon Filter Window=
A Mesecon receptor which is opaque when it isn't powered and is semi-transparent to light when powered.=
Mesecon Filter Glass=
A Mesecon receptor which lets light through. When not powered, it is semi-transparent, i.e. it is transparent to light, but filters out sunlight. When powered, it is fully transparent to light and sunlight.=