diff options
Diffstat (limited to 'signs/nodes.lua')
-rw-r--r-- | signs/nodes.lua | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/signs/nodes.lua b/signs/nodes.lua index 36d07dc..abd63a0 100644 --- a/signs/nodes.lua +++ b/signs/nodes.lua @@ -18,6 +18,9 @@ along with signs. If not, see <http://www.gnu.org/licenses/>. --]] +local S = signs.intllib +local F = function(...) return minetest.formspec_escape(S(...)) end + -- Poster specific formspec local function on_rightclick_poster(pos, node, player) local formspec @@ -25,9 +28,9 @@ local function on_rightclick_poster(pos, node, player) if not minetest.is_protected(pos, player:get_player_name()) then formspec = "size[6.5,7.5]".. - "field[0.5,0.7;6,1;display_text;Title;"..minetest.formspec_escape(meta:get_string("display_text")).."]".. - "textarea[0.5,1.7;6,6;text;Text;"..minetest.formspec_escape(meta:get_string("text")).."]".. - "button_exit[2,7;2,1;ok;Write]" + "field[0.5,0.7;6,1;display_text;"..F("Title")..";"..minetest.formspec_escape(meta:get_string("display_text")).."]".. + "textarea[0.5,1.7;6,6;text;"..F("Text")..";"..minetest.formspec_escape(meta:get_string("text")).."]".. + "button_exit[2,7;2,1;ok;"..F("Write").."]" minetest.show_formspec(player:get_player_name(), "signs:poster@"..minetest.pos_to_string(pos), formspec) @@ -37,7 +40,7 @@ local function on_rightclick_poster(pos, node, player) "label[0.5,0;"..minetest.formspec_escape(meta:get_string("display_text")).."]".. "textarea[0.5,1;6,7;;"..minetest.formspec_escape(meta:get_string("text"))..";]".. "bgcolor[#111]".. - "button_exit[2,7;2,1;ok;Close]" + "button_exit[2,7;2,1;ok;"..F("Close").."]" minetest.show_formspec(player:get_player_name(), "", formspec) @@ -53,7 +56,7 @@ local function on_receive_fields_poster(pos, formname, fields, player) meta:set_string("display_text", fields.display_text) meta:set_string("text", fields.text) meta:set_string("infotext", "\""..fields.display_text - .."\"\n(right-click to read more text)") + .."\"\n"..S("(right-click to read more text)")) display_lib.update_entities(pos) end end @@ -75,7 +78,7 @@ local models = { color="#000", }, node_fields = { - description="Wooden direction sign", + description=S("Wooden direction sign"), tiles={"signs_wooden_direction.png"}, inventory_image="signs_wooden_inventory.png", on_place=signs.on_place_direction, @@ -103,7 +106,7 @@ local models = { color="#000", }, node_fields = { - description="Wooden direction sign", + description=S("Wooden direction sign"), tiles={"signs_wooden_direction.png"}, inventory_image="signs_wooden_inventory.png", on_place=signs.on_place_direction, @@ -133,7 +136,7 @@ local models = { valign="top", }, node_fields = { - description="Poster", + description=S("Poster"), tiles={"signs_poster.png"}, inventory_image="signs_poster_inventory.png", on_construct=display_lib.on_construct, @@ -169,4 +172,3 @@ else }, }) end - |