mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-07-09 03:20:37 +02:00
replace intllib
This commit is contained in:
@ -18,8 +18,7 @@
|
||||
along with signs. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
local S = signs.intllib
|
||||
local F = function(...) return minetest.formspec_escape(S(...)) end
|
||||
local S = signs.S
|
||||
|
||||
-- Poster specific formspec
|
||||
local function display_poster(pos, node, player)
|
||||
@ -47,11 +46,11 @@ local function display_poster(pos, node, player)
|
||||
minetest.formspec_escape(meta:get_string("text"))))
|
||||
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, F("Close"))
|
||||
fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, S("Close"))
|
||||
else
|
||||
fs = string.format(
|
||||
"%sbutton[1,8;2,1;edit;%s]button_exit[4,8;2,1;ok;%s]",
|
||||
fs, F("Edit"), F("Close"))
|
||||
fs, S("Edit"), S("Close"))
|
||||
end
|
||||
minetest.show_formspec(player:get_player_name(), fname, fs)
|
||||
end
|
||||
@ -70,10 +69,10 @@ local function edit_poster(pos, node, player)
|
||||
textarea[0.5,1.7;6,6;text;%s;%s]
|
||||
button[1.25,7;2,1;font;%s]
|
||||
button_exit[3.25,7;2,1;write;%s]]=],
|
||||
default.gui_bg, default.gui_bg_img, default.gui_slots, F("Title"),
|
||||
default.gui_bg, default.gui_bg_img, default.gui_slots, S("Title"),
|
||||
minetest.formspec_escape(meta:get_string("display_text")),
|
||||
F("Text"), minetest.formspec_escape(meta:get_string("text")),
|
||||
F("Title font"), F("Write"))
|
||||
S("Text"), minetest.formspec_escape(meta:get_string("text")),
|
||||
S("Title font"), S("Write"))
|
||||
minetest.show_formspec(player:get_player_name(), fname, fs)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user