Translation part 1

This commit is contained in:
tour 2024-02-14 13:06:55 +01:00
parent 57e2520b35
commit 7e71f8aa84

View File

@ -1,17 +1,17 @@
local S = minetest.get_translator("chat_formspec")
function chat_formspec.easy_syntax_to_formspec(context)
local fs_def = string.split(context.easy_syntax, "#", false, -1, false)
local target_template = [[button[11.3,0.3;3,0.8;chat_help;How to chat?]
label[0.4,0.7;I (%s) tried to contact you via chat already\, but you did not respond]
textarea[0.4,1.6;13.8,4.2;;;%s]
]]
local target_template = "button[11.3,0.3;3,0.8;chat_help;" .. S("How to chat?") .. "]" ..
"label[0.4,0.7;" .. S("I (@1) tried to contact you via chat already, but you did not respond", "%s") .. "]" ..
"textarea[0.4,1.6;13.8,4.2;;;%s]"
local fs = string.format(target_template, context.sender, fs_def[1])
if #fs_def == 1 then -- there were no answer-options provided, so we will create a input field
fs = fs .. [[
field[0.3,6.4;10.7,0.8;answer;Your answer;]
button_exit[11.3,6.4;3,0.8;submit;submit]
]]
fs = fs ..
"field[0.3,6.4;10.7,0.8;answer;" .. S("Your answer") .. ";]" ..
"button_exit[11.3,6.4;3,0.8;submit;" .. S("submit") .. "]"
elseif #fs_def == 2 then
fs = fs .. string.format("button_exit[5.5,6.4;3,0.8;answer;%s]", fs_def[2])
else
@ -67,52 +67,53 @@ function chat_formspec.create_target_fs(context)
end
chat_formspec.misc_fs = {}
chat_formspec.misc_fs.platform_select = [[
formspec_version[2]
size[9,4]
chat_formspec.misc_fs.platform_select = "" ..
"formspec_version[2]" ..
"size[9,4]" ..
label[2.3,1;Do you play on Touchscreen or on PC]
button[1,2;3,0.8;PC;PC]
button[5,2;3,0.8;touch;Touchscreen]
]]
"label[2.3,1;" .. S("Do you play on Touchscreen or on PC") .. "]" ..
"button[1,2;3,0.8;PC;" .. S("PC") .. "]" ..
"button[5,2;3,0.8;touch;" .. S("Touchscreen") .. "]"
chat_formspec.misc_fs.chat_PC = [[
formspec_version[2]
size[12,9.5]
chat_formspec.misc_fs.chat_PC = "" ..
"formspec_version[2]" ..
"size[12,9.5]" ..
label[4.5,0.8;How to chat on PC?]
label[4.5,0.8;________________]
"style_type[label;font=bold;font_size=+5]" ..
"label[4,0.5;" .. S("How to chat on PC?") .. "]" ..
"style_type[label;font=normal;font_size=+0]" ..
textarea[0.5,1.35;11,6;;;1) close all pop-ups inside minetest by pressing 'ESC'
2) Press your 'T' or 'F10' key
3) Write the text you want to send to the public chat
in case you do not want everyone to see you text, add a '/m playername' in front of you text.
only the player with the name you specified will see your text then
4) send your Text by pressing 'Enter'
"textarea[0.5,1.35;11,6;;;" ..
S("1) close all pop-ups inside minetest by pressing 'ESC'") ..
S("2) Press your 'T' or 'F10' key") ..
S("3) Write the text you want to send to the public chat\n") ..
" " .. S("in case you do not want everyone to see you text, add a '/m playername' in front of you text.") ..
" " .. S("only the player with the name you specified will see your text then") ..
S("4) send your Text by pressing 'Enter'") ..
In case you can't see the chat, try pressing 'F2' to show / hide the chat]
S("In case you can't see the chat, try pressing 'F2' to show / hide the chat") ..
"]" ..
button[4.5,8;3,0.8;ok;OK]
]]
"button[4.5,8;3,0.8;ok;" .. S("OK") .. "]"
chat_formspec.misc_fs.chat_touch = [[
formspec_version[2]
size[12,9.5]
style_type[*;noclip=true]
chat_formspec.misc_fs.chat_touch = "" ..
"formspec_version[2]" ..
"size[12,9.5]" ..
"style_type[*;noclip=true]" ..
label[4.5,0.8;How to chat on mobile?]
label[4.5,0.8;___________________]
"style_type[label;font=bold;font_size=+5]" ..
"label[4,0.5;" .. S("How to chat on mobile?") .. "]" ..
"style_type[label;font=normal;font_size=+0]" ..
label[0.5,1.35;1) Close all pop-ups inside Minetest by tapping outside of them]
label[0.5,1.85;2) Press the following buttons:]
image[0.5,2.35;0.75,1;rare_controls.png]
image[3,2.35;1,1;chat_btn.png]
label[0.5,3.85;3) Write the text you want to send in the public Chat]
label[0.5,4.35;4) Confirm by pressing 'Enter']
"label[0.5,1.35;" .. S("1) Close all pop-ups inside Minetest by tapping outside of them") .. "]" ..
"label[0.5,1.85;" .. S("2) Press the following buttons:") .. "]" ..
"image[0.5,2.35;0.75,1;rare_controls.png]" ..
"image[3,2.35;1,1;chat_btn.png]" ..
"label[0.5,3.85;" .. S("3) Write the text you want to send in the public Chat") .. "]" ..
"label[0.5,4.35;" .. S("4) Confirm by pressing 'Enter'") .. "]" ..
label[0.5,5;In case you can't see the chat, try pressing the following buttons:]
image[0.5,5.5;1,1;gear_icon.png]
image[3,5.5;1,1;chat_show_btn.png]
"label[0.5,5;" .. S("In case you can't see the chat, try pressing the following buttons:") .. "]" ..
"image[0.5,5.5;1,1;gear_icon.png]" ..
"image[3,5.5;1,1;chat_show_btn.png]" ..
button[4.5,8;3,0.8;ok;OK]
]]
"button[4.5,8;3,0.8;ok;" .. S("OK" ) .. "]"