composing string via concate now

This commit is contained in:
Sokomine 2023-12-18 04:46:01 +01:00
parent 0f0593100e
commit 2cbac5ca7e

View File

@ -407,13 +407,13 @@ yl_speak_up.get_fs_edit_dialog_modification = function(dialog, d_id, alternate_d
if(forbid_turn_into_new_dialog) then
nd = ""
end
return "size[20,13.5]"..
"label[6.0,0.5;Edit alternate text]"..
return table.concat({"size[20,13.5]",
"label[6.0,0.5;Edit alternate text]",
"label[0.2,1.0;The alternate text which you can edit here will be shown instead of "..
"the normal text of the dialog \""..tostring(d_id).."\" - but *only*\n"..
tostring(explanation or "- missing explanation -")..".]"..
"label[0.2,2.3;This is the normal text of dialog \""..
minetest.formspec_escape(tostring(d_id)).."\", shown for reference:]"..
"the normal text of the dialog \"", tostring(d_id), "\" - but *only*\n",
tostring(explanation or "- missing explanation -"), ".]",
"label[0.2,2.3;This is the normal text of dialog \"",
minetest.formspec_escape(tostring(d_id)), "\", shown for reference:]",
yl_speak_up.show_colored_dialog_text(
dialog,
{r_id = "", r_type = "dialog"},
@ -421,13 +421,14 @@ yl_speak_up.get_fs_edit_dialog_modification = function(dialog, d_id, alternate_d
"1.2,2.6;18.0,4.0;d_text_orig",
"", -- no modifications possible at this step
"",
"").. -- no edit button here as this text cannot be changed here
""), -- no edit button here as this text cannot be changed here
"label[0.2,7.3;Enter the alternate text here. $TEXT$ will be replaced with the normal "..
"dialog text above:]"..
"textarea[1.2,7.6;18.0,4.5;d_text_new;;"..
minetest.formspec_escape(alternate_dialog_text or "$TEXT$").."]"..
"button[3.0,12.3;1,0.7;back_from_edit_dialog_modification;Abort]"..
"button[6.0,12.3;1,0.7;save_dialog_modification;Save]"..
"dialog text above:]",
"textarea[1.2,7.6;18.0,4.5;d_text_new;;",
minetest.formspec_escape(alternate_dialog_text or "$TEXT$"), "]",
"button[3.0,12.3;1,0.7;back_from_edit_dialog_modification;Abort]",
"button[6.0,12.3;1,0.7;save_dialog_modification;Save]",
nd
}, "")
end