Add translation tags

This commit is contained in:
Athozus 2023-03-29 19:08:08 +02:00
parent b3e0c158f7
commit db9d96b511
No known key found for this signature in database
GPG key ID: B50895022E8484BF
8 changed files with 84 additions and 85 deletions

View file

@ -3,16 +3,16 @@ local FORMNAME = "mail:compose"
function mail.show_compose(name, to, subject, body, cc, bcc) function mail.show_compose(name, to, subject, body, cc, bcc)
local formspec = [[ local formspec = [[
size[8,9] size[8,9]
button[0,0;1,1;tocontacts;To:] button[0,0;1,1;tocontacts;]] .. S("To") .. [[:]
field[1.1,0.3;3.2,1;to;;%s] field[1.1,0.3;3.2,1;to;;%s]
button[4,0;1,1;cccontacts;CC:] button[4,0;1,1;cccontacts;]] .. S("CC") .. [[:]
field[5.1,0.3;3.1,1;cc;;%s] field[5.1,0.3;3.1,1;cc;;%s]
button[4,0.75;1,1;bcccontacts;BCC:] button[4,0.75;1,1;bcccontacts;]] .. S("BCC") .. [[:]
field[5.1,1.05;3.1,1;bcc;;%s] field[5.1,1.05;3.1,1;bcc;;%s]
field[0.25,2;8,1;subject;Subject:;%s] field[0.25,2;8,1;subject;]] .. S("Subject") .. [[:;%s]
textarea[0.25,2.5;8,6;body;;%s] textarea[0.25,2.5;8,6;body;;%s]
button[0.5,8.5;3,1;cancel;Cancel] button[0.5,8.5;3,1;cancel;]] .. S("Cancel") .. [[]
button[4.5,8.5;3,1;send;Send] button[4.5,8.5;3,1;send;]] .. S("Send") .. [[]
]] .. mail.theme ]] .. mail.theme
formspec = string.format(formspec, formspec = string.format(formspec,

View file

@ -1,12 +1,12 @@
local FORMNAME = "mail:contacts" local FORMNAME = "mail:contacts"
local contacts_formspec = "size[8,9;]" .. mail.theme .. [[ local contacts_formspec = "size[8,9;]" .. mail.theme .. [[
button[6,0.10;2,0.5;new;New] button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
button[6,0.85;2,0.5;edit;Edit] button[6,0.85;2,0.5;edit;]] .. S("Edit") .. [[]
button[6,1.60;2,0.5;delete;Delete] button[6,1.60;2,0.5;delete;]] .. S("Delete") .. [[]
button[6,8.25;2,0.5;back;Back] button[6,8.25;2,0.5;back;]] .. S("Back") .. [[]
tablecolumns[color;text;text] tablecolumns[color;text;text]
table[0,0;5.75,9;contacts;#999,Name,Note]] table[0,0;5.75,9;contacts;#999,]] .. S("Name") .. "," .. S("Note")
function mail.show_contacts(name) function mail.show_contacts(name)

View file

@ -3,22 +3,22 @@ local FORMNAME = "mail:editcontact"
function mail.show_edit_contact(name, contact_name, note, illegal_name_hint) function mail.show_edit_contact(name, contact_name, note, illegal_name_hint)
local formspec = [[ local formspec = [[
size[6,7] size[6,7]
button[4,6.25;2,0.5;back;Back] button[4,6.25;2,0.5;back;]] .. S("Back") .. [[]
field[0.25,0.5;4,1;name;Player name:;%s] field[0.25,0.5;4,1;name;]] .. S("Player name") .. [[:;%s]
textarea[0.25,1.6;4,6.25;note;Note:;%s] textarea[0.25,1.6;4,6.25;note;]] .. S("Note") .. [[:;%s]
button[4,0.10;2,1;save;Save] button[4,0.10;2,1;save;]] .. S("Save") .. [[]
]] ]]
if illegal_name_hint == "collision" then if illegal_name_hint == "collision" then
formspec = formspec .. [[ formspec = formspec .. [[
label[4,1;That name] label[4,1;]] .. S("That name") .. [[]
label[4,1.5;is already in] label[4,1.5;]] .. S("is already in") .. [[]
label[4,2;your contacts.] label[4,2;]] .. S("your contacts.") .. [[]
]] ]]
elseif illegal_name_hint == "empty" then elseif illegal_name_hint == "empty" then
formspec = formspec .. [[ formspec = formspec .. [[
label[4,1;The contact] label[4,1;]] .. S("The contact") .. [[]
label[4,1.5;name cannot] label[4,1.5;]] .. S("name cannot") .. [[]
label[4,2;be empty.] label[4,2;]] .. S("be empty.") .. [[]
]] ]]
end end
formspec = formspec .. mail.theme formspec = formspec .. mail.theme

View file

@ -3,23 +3,23 @@ local FORMNAME = "mail:editmaillist"
function mail.show_edit_maillist(playername, maillist_name, desc, players, illegal_name_hint) function mail.show_edit_maillist(playername, maillist_name, desc, players, illegal_name_hint)
local formspec = [[ local formspec = [[
size[6,7] size[6,7]
button[4,6.25;2,0.5;back;Back] button[4,6.25;2,0.5;back;]] .. S("Back") .. [[]
field[0.25,0.5;4,1;name;Maillist name:;%s] field[0.25,0.5;4,1;name;]] .. S("Maillist name") .. [[:;%s]
textarea[0.25,1.6;4,2;desc;Desc:;%s] textarea[0.25,1.6;4,2;desc;]] .. S("Desc") .. [[:;%s]
textarea[0.25,3.6;4,4.25;players;Players:;%s] textarea[0.25,3.6;4,4.25;players;]] .. S("Players") .. [[:;%s]
button[4,0.10;2,1;save;Save] button[4,0.10;2,1;save;]] .. S("Save") .. [[]
]] ]]
if illegal_name_hint == "collision" then if illegal_name_hint == "collision" then
formspec = formspec .. [[ formspec = formspec .. [[
label[4,1;That name] label[4,1;]] .. S("That name") .. [[]
label[4,1.5;is already in] label[4,1.5;]] .. S("is already in") .. [[]
label[4,2;your maillists.] label[4,2;]] .. S("your maillists.") .. [[]
]] ]]
elseif illegal_name_hint == "empty" then elseif illegal_name_hint == "empty" then
formspec = formspec .. [[ formspec = formspec .. [[
label[4,1;The maillist] label[4,1;]] .. S("The maillist") .. [[]
label[4,1.5;name cannot] label[4,1.5;]] .. S("name cannot") .. [[]
label[4,2;be empty.] label[4,2;]] .. S("be empty.") .. [[]
]] ]]
end end
formspec = formspec .. mail.theme formspec = formspec .. mail.theme

View file

@ -1,21 +1,21 @@
local inbox_formspec = "size[8,10;]" .. mail.theme .. [[ local inbox_formspec = "size[8,10;]" .. mail.theme .. [[
tabheader[0.3,1;boxtab;Inbox,Sent messages;1;false;false] tabheader[0.3,1;boxtab;]] .. S("Inbox") .. "," .. S("Sent messages") .. [[;1;false;false]
button[6,0.10;2,0.5;new;New] button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
button[6,0.95;2,0.5;read;Read] button[6,0.95;2,0.5;read;]] .. S("Read") .. [[]
button[6,1.70;2,0.5;reply;Reply] button[6,1.70;2,0.5;reply;]] .. S("Reply") .. [[]
button[6,2.45;2,0.5;replyall;Reply All] button[6,2.45;2,0.5;replyall;]] .. S("Reply all") .. [[]
button[6,3.20;2,0.5;forward;Forward] button[6,3.20;2,0.5;forward;]] .. S("Forward") .. [[]
button[6,3.95;2,0.5;delete;Delete] button[6,3.95;2,0.5;delete;]] .. S("Delete") .. [[]
button[6,4.82;2,0.5;markread;Mark Read] button[6,4.82;2,0.5;markread;]] .. S("Mark Read") .. [[]
button[6,5.55;2,0.5;markunread;Mark Unread] button[6,5.55;2,0.5;markunread;]] .. S("Mark Unread") .. [[]
button[6,6.8;2,0.5;contacts;Contacts] button[6,6.8;2,0.5;contacts;]] .. S("Contacts") .. [[]
button[6,7.6;2,0.5;maillists;Mail lists] button[6,7.6;2,0.5;maillists;]] .. S("Mail lists") .. [[]
button[6,8.7;2,0.5;about;About] button[6,8.7;2,0.5;about;]] .. S("About") .. [[]
button_exit[6,9.5;2,0.5;quit;Close] button_exit[6,9.5;2,0.5;quit;]] .. S("Close") .. [[]
tablecolumns[color;text;text] tablecolumns[color;text;text]
table[0,0.7;5.75,9.35;inbox;#999,From,Subject]] table[0,0.7;5.75,9.35;inbox;#999,]] .. S("From") .. "," .. S("Subject")
function mail.show_inbox(name) function mail.show_inbox(name)
@ -51,7 +51,7 @@ function mail.show_inbox(name)
formspec[#formspec + 1] = minetest.formspec_escape(message.subject) formspec[#formspec + 1] = minetest.formspec_escape(message.subject)
end end
else else
formspec[#formspec + 1] = "(No subject)" formspec[#formspec + 1] = S("(No subject)")
end end
end end
if mail.selected_idxs.inbox[name] then if mail.selected_idxs.inbox[name] then
@ -60,7 +60,7 @@ function mail.show_inbox(name)
end end
formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "]"
else else
formspec[#formspec + 1] = "]label[2.25,4.5;No mail]" formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No mail") .. "]"
end end
minetest.show_formspec(name, "mail:inbox", table.concat(formspec, "")) minetest.show_formspec(name, "mail:inbox", table.concat(formspec, ""))
end end

View file

@ -1,12 +1,12 @@
local FORMNAME = "mail:maillists" local FORMNAME = "mail:maillists"
local maillists_formspec = "size[8,9;]" .. mail.theme .. [[ local maillists_formspec = "size[8,9;]" .. mail.theme .. [[
button[6,0.10;2,0.5;new;New] button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
button[6,0.85;2,0.5;edit;Edit] button[6,0.85;2,0.5;edit;]] .. S("Edit") .. [[]
button[6,1.60;2,0.5;delete;Delete] button[6,1.60;2,0.5;delete;]] .. S("Delete") .. [[]
button[6,8.25;2,0.5;back;Back] button[6,8.25;2,0.5;back;]] .. S("Back") .. [[]
tablecolumns[color;text;text] tablecolumns[color;text;text]
table[0,0;5.75,9;maillists;#999,Name,Description]] table[0,0;5.75,9;maillists;#999,]] .. S("Name") .. "," .. S("Note")
function mail.show_maillists(name) function mail.show_maillists(name)
local formspec = { maillists_formspec } local formspec = { maillists_formspec }
@ -26,7 +26,7 @@ function mail.show_maillists(name)
formspec[#formspec + 1] = minetest.formspec_escape(maillist.desc) formspec[#formspec + 1] = minetest.formspec_escape(maillist.desc)
end end
else else
formspec[#formspec + 1] = "(No description)" formspec[#formspec + 1] = S("(No description)")
end end
end end
if mail.selected_idxs.maillists[name] then if mail.selected_idxs.maillists[name] then
@ -35,7 +35,7 @@ function mail.show_maillists(name)
end end
formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "]"
else else
formspec[#formspec + 1] = "]label[2.25,4.5;No maillist]" formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No maillist") .. "]"
end end
minetest.show_formspec(name, FORMNAME, table.concat(formspec, "")) minetest.show_formspec(name, FORMNAME, table.concat(formspec, ""))
end end

View file

@ -10,18 +10,18 @@ function mail.show_message(name, id)
button[7.25,0.15;0.75,0.5;back;X] button[7.25,0.15;0.75,0.5;back;X]
label[0.2,0.1;From: %s] label[0.2,0.1;]] .. S("From") .. [[: %s]
label[0.2,0.5;To: %s] label[0.2,0.5;]] .. S("To") .. [[: %s]
label[0.2,0.9;CC: %s] label[0.2,0.9;]] .. S("CC") .. [[: %s]
label[0.2,1.3;Date: %s] label[0.2,1.3;]] .. S("Date") .. [[: %s]
label[0,2.1;Subject: %s] label[0,2.1;]] .. S("Subject") .. [[: %s]
textarea[0.25,2.6;8,7.0;;;%s] textarea[0.25,2.6;8,7.0;;;%s]
button[0,8.5;2,1;reply;Reply] button[0,8.5;2,1;reply;]] .. S("Reply") .. [[]
button[2,8.5;2,1;replyall;Reply All] button[2,8.5;2,1;replyall;]] .. S("Reply all") .. [[]
button[4,8.5;2,1;forward;Forward] button[4,8.5;2,1;forward;]] .. S("Forward") .. [[]
button[6,8.5;2,1;delete;Delete] button[6,8.5;2,1;delete;]] .. S("Delete") .. [[]
]] .. mail.theme ]] .. mail.theme
local from = minetest.formspec_escape(message.from) or "" local from = minetest.formspec_escape(message.from) or ""

View file

@ -1,20 +1,19 @@
local sent_formspec = "size[8,10;]" .. mail.theme .. [[ local sent_formspec = "size[8,10;]" .. mail.theme .. [[
tabheader[0.3,1;boxtab;Inbox,Sent messages;2;false;false] tabheader[0.3,1;boxtab;]] .. S("Inbox") .. "," .. S("Sent messages") .. [[;2;false;false]
button[6,0.10;2,0.5;new;New] button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
button[6,0.95;2,0.5;read;Read] button[6,0.95;2,0.5;read;]] .. S("Read") .. [[]
button[6,1.70;2,0.5;reply;Reply] button[6,1.70;2,0.5;reply;]] .. S("Reply") .. [[]
button[6,2.45;2,0.5;replyall;Reply All] button[6,2.45;2,0.5;replyall;]] .. S("Reply all") .. [[]
button[6,3.20;2,0.5;forward;Forward] button[6,3.20;2,0.5;forward;]] .. S("Forward") .. [[]
button[6,3.95;2,0.5;delete;Delete] button[6,3.95;2,0.5;delete;]] .. S("Delete") .. [[]
button[6,6.8;2,0.5;contacts;Contacts] button[6,6.8;2,0.5;contacts;]] .. S("Contacts") .. [[]
button[6,7.6;2,0.5;maillists;Mail lists] button[6,7.6;2,0.5;maillists;]] .. S("Mail lists") .. [[]
button[6,8.7;2,0.5;about;About] button[6,8.7;2,0.5;about;]] .. S("About") .. [[]
button_exit[6,9.5;2,0.5;quit;Close] button_exit[6,9.5;2,0.5;quit;]] .. S("Close") .. [[]
tablecolumns[color;text;text] tablecolumns[color;text;text]
table[0,0.7;5.75,9.35;sent;#999,To,Subject]] table[0,0.7;5.75,9.35;sent;#999,]] .. S("To") .. "," .. S("Subject")
function mail.show_sent(name) function mail.show_sent(name)
@ -38,7 +37,7 @@ function mail.show_sent(name)
formspec[#formspec + 1] = minetest.formspec_escape(message.subject) formspec[#formspec + 1] = minetest.formspec_escape(message.subject)
end end
else else
formspec[#formspec + 1] = "(No subject)" formspec[#formspec + 1] = S("(No subject)")
end end
end end
if mail.selected_idxs.sent[name] then if mail.selected_idxs.sent[name] then
@ -47,7 +46,7 @@ function mail.show_sent(name)
end end
formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "]"
else else
formspec[#formspec + 1] = "]label[2.25,4.5;No mail]" formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No mail") .. "]"
end end
minetest.show_formspec(name, "mail:sent", table.concat(formspec, "")) minetest.show_formspec(name, "mail:sent", table.concat(formspec, ""))
end end