mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-12 17:32:21 -04:00
Add translation tags
This commit is contained in:
parent
b3e0c158f7
commit
db9d96b511
8 changed files with 84 additions and 85 deletions
|
@ -3,16 +3,16 @@ local FORMNAME = "mail:compose"
|
|||
function mail.show_compose(name, to, subject, body, cc, bcc)
|
||||
local formspec = [[
|
||||
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]
|
||||
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]
|
||||
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[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]
|
||||
button[0.5,8.5;3,1;cancel;Cancel]
|
||||
button[4.5,8.5;3,1;send;Send]
|
||||
button[0.5,8.5;3,1;cancel;]] .. S("Cancel") .. [[]
|
||||
button[4.5,8.5;3,1;send;]] .. S("Send") .. [[]
|
||||
]] .. mail.theme
|
||||
|
||||
formspec = string.format(formspec,
|
||||
|
@ -86,4 +86,4 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
return true
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
local FORMNAME = "mail:contacts"
|
||||
|
||||
local contacts_formspec = "size[8,9;]" .. mail.theme .. [[
|
||||
button[6,0.10;2,0.5;new;New]
|
||||
button[6,0.85;2,0.5;edit;Edit]
|
||||
button[6,1.60;2,0.5;delete;Delete]
|
||||
button[6,8.25;2,0.5;back;Back]
|
||||
button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
|
||||
button[6,0.85;2,0.5;edit;]] .. S("Edit") .. [[]
|
||||
button[6,1.60;2,0.5;delete;]] .. S("Delete") .. [[]
|
||||
button[6,8.25;2,0.5;back;]] .. S("Back") .. [[]
|
||||
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)
|
||||
|
@ -80,4 +80,4 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
return true
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -3,22 +3,22 @@ local FORMNAME = "mail:editcontact"
|
|||
function mail.show_edit_contact(name, contact_name, note, illegal_name_hint)
|
||||
local formspec = [[
|
||||
size[6,7]
|
||||
button[4,6.25;2,0.5;back;Back]
|
||||
field[0.25,0.5;4,1;name;Player name:;%s]
|
||||
textarea[0.25,1.6;4,6.25;note;Note:;%s]
|
||||
button[4,0.10;2,1;save;Save]
|
||||
button[4,6.25;2,0.5;back;]] .. S("Back") .. [[]
|
||||
field[0.25,0.5;4,1;name;]] .. S("Player name") .. [[:;%s]
|
||||
textarea[0.25,1.6;4,6.25;note;]] .. S("Note") .. [[:;%s]
|
||||
button[4,0.10;2,1;save;]] .. S("Save") .. [[]
|
||||
]]
|
||||
if illegal_name_hint == "collision" then
|
||||
formspec = formspec .. [[
|
||||
label[4,1;That name]
|
||||
label[4,1.5;is already in]
|
||||
label[4,2;your contacts.]
|
||||
label[4,1;]] .. S("That name") .. [[]
|
||||
label[4,1.5;]] .. S("is already in") .. [[]
|
||||
label[4,2;]] .. S("your contacts.") .. [[]
|
||||
]]
|
||||
elseif illegal_name_hint == "empty" then
|
||||
formspec = formspec .. [[
|
||||
label[4,1;The contact]
|
||||
label[4,1.5;name cannot]
|
||||
label[4,2;be empty.]
|
||||
label[4,1;]] .. S("The contact") .. [[]
|
||||
label[4,1.5;]] .. S("name cannot") .. [[]
|
||||
label[4,2;]] .. S("be empty.") .. [[]
|
||||
]]
|
||||
end
|
||||
formspec = formspec .. mail.theme
|
||||
|
@ -71,4 +71,4 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
return true
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -3,23 +3,23 @@ local FORMNAME = "mail:editmaillist"
|
|||
function mail.show_edit_maillist(playername, maillist_name, desc, players, illegal_name_hint)
|
||||
local formspec = [[
|
||||
size[6,7]
|
||||
button[4,6.25;2,0.5;back;Back]
|
||||
field[0.25,0.5;4,1;name;Maillist name:;%s]
|
||||
textarea[0.25,1.6;4,2;desc;Desc:;%s]
|
||||
textarea[0.25,3.6;4,4.25;players;Players:;%s]
|
||||
button[4,0.10;2,1;save;Save]
|
||||
button[4,6.25;2,0.5;back;]] .. S("Back") .. [[]
|
||||
field[0.25,0.5;4,1;name;]] .. S("Maillist name") .. [[:;%s]
|
||||
textarea[0.25,1.6;4,2;desc;]] .. S("Desc") .. [[:;%s]
|
||||
textarea[0.25,3.6;4,4.25;players;]] .. S("Players") .. [[:;%s]
|
||||
button[4,0.10;2,1;save;]] .. S("Save") .. [[]
|
||||
]]
|
||||
if illegal_name_hint == "collision" then
|
||||
formspec = formspec .. [[
|
||||
label[4,1;That name]
|
||||
label[4,1.5;is already in]
|
||||
label[4,2;your maillists.]
|
||||
label[4,1;]] .. S("That name") .. [[]
|
||||
label[4,1.5;]] .. S("is already in") .. [[]
|
||||
label[4,2;]] .. S("your maillists.") .. [[]
|
||||
]]
|
||||
elseif illegal_name_hint == "empty" then
|
||||
formspec = formspec .. [[
|
||||
label[4,1;The maillist]
|
||||
label[4,1.5;name cannot]
|
||||
label[4,2;be empty.]
|
||||
label[4,1;]] .. S("The maillist") .. [[]
|
||||
label[4,1.5;]] .. S("name cannot") .. [[]
|
||||
label[4,2;]] .. S("be empty.") .. [[]
|
||||
]]
|
||||
end
|
||||
formspec = formspec .. mail.theme
|
||||
|
@ -50,4 +50,4 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
return true
|
||||
end)
|
||||
end)
|
||||
|
|
32
ui/inbox.lua
32
ui/inbox.lua
|
@ -1,21 +1,21 @@
|
|||
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.95;2,0.5;read;Read]
|
||||
button[6,1.70;2,0.5;reply;Reply]
|
||||
button[6,2.45;2,0.5;replyall;Reply All]
|
||||
button[6,3.20;2,0.5;forward;Forward]
|
||||
button[6,3.95;2,0.5;delete;Delete]
|
||||
button[6,4.82;2,0.5;markread;Mark Read]
|
||||
button[6,5.55;2,0.5;markunread;Mark Unread]
|
||||
button[6,6.8;2,0.5;contacts;Contacts]
|
||||
button[6,7.6;2,0.5;maillists;Mail lists]
|
||||
button[6,8.7;2,0.5;about;About]
|
||||
button_exit[6,9.5;2,0.5;quit;Close]
|
||||
button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
|
||||
button[6,0.95;2,0.5;read;]] .. S("Read") .. [[]
|
||||
button[6,1.70;2,0.5;reply;]] .. S("Reply") .. [[]
|
||||
button[6,2.45;2,0.5;replyall;]] .. S("Reply all") .. [[]
|
||||
button[6,3.20;2,0.5;forward;]] .. S("Forward") .. [[]
|
||||
button[6,3.95;2,0.5;delete;]] .. S("Delete") .. [[]
|
||||
button[6,4.82;2,0.5;markread;]] .. S("Mark Read") .. [[]
|
||||
button[6,5.55;2,0.5;markunread;]] .. S("Mark Unread") .. [[]
|
||||
button[6,6.8;2,0.5;contacts;]] .. S("Contacts") .. [[]
|
||||
button[6,7.6;2,0.5;maillists;]] .. S("Mail lists") .. [[]
|
||||
button[6,8.7;2,0.5;about;]] .. S("About") .. [[]
|
||||
button_exit[6,9.5;2,0.5;quit;]] .. S("Close") .. [[]
|
||||
|
||||
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)
|
||||
|
@ -51,7 +51,7 @@ function mail.show_inbox(name)
|
|||
formspec[#formspec + 1] = minetest.formspec_escape(message.subject)
|
||||
end
|
||||
else
|
||||
formspec[#formspec + 1] = "(No subject)"
|
||||
formspec[#formspec + 1] = S("(No subject)")
|
||||
end
|
||||
end
|
||||
if mail.selected_idxs.inbox[name] then
|
||||
|
@ -60,7 +60,7 @@ function mail.show_inbox(name)
|
|||
end
|
||||
formspec[#formspec + 1] = "]"
|
||||
else
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;No mail]"
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No mail") .. "]"
|
||||
end
|
||||
minetest.show_formspec(name, "mail:inbox", table.concat(formspec, ""))
|
||||
end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
local FORMNAME = "mail:maillists"
|
||||
|
||||
local maillists_formspec = "size[8,9;]" .. mail.theme .. [[
|
||||
button[6,0.10;2,0.5;new;New]
|
||||
button[6,0.85;2,0.5;edit;Edit]
|
||||
button[6,1.60;2,0.5;delete;Delete]
|
||||
button[6,8.25;2,0.5;back;Back]
|
||||
button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
|
||||
button[6,0.85;2,0.5;edit;]] .. S("Edit") .. [[]
|
||||
button[6,1.60;2,0.5;delete;]] .. S("Delete") .. [[]
|
||||
button[6,8.25;2,0.5;back;]] .. S("Back") .. [[]
|
||||
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)
|
||||
local formspec = { maillists_formspec }
|
||||
|
@ -26,7 +26,7 @@ function mail.show_maillists(name)
|
|||
formspec[#formspec + 1] = minetest.formspec_escape(maillist.desc)
|
||||
end
|
||||
else
|
||||
formspec[#formspec + 1] = "(No description)"
|
||||
formspec[#formspec + 1] = S("(No description)")
|
||||
end
|
||||
end
|
||||
if mail.selected_idxs.maillists[name] then
|
||||
|
@ -35,7 +35,7 @@ function mail.show_maillists(name)
|
|||
end
|
||||
formspec[#formspec + 1] = "]"
|
||||
else
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;No maillist]"
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No maillist") .. "]"
|
||||
end
|
||||
minetest.show_formspec(name, FORMNAME, table.concat(formspec, ""))
|
||||
end
|
||||
|
@ -107,4 +107,4 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
return true
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -10,18 +10,18 @@ function mail.show_message(name, id)
|
|||
|
||||
button[7.25,0.15;0.75,0.5;back;X]
|
||||
|
||||
label[0.2,0.1;From: %s]
|
||||
label[0.2,0.5;To: %s]
|
||||
label[0.2,0.9;CC: %s]
|
||||
label[0.2,1.3;Date: %s]
|
||||
label[0.2,0.1;]] .. S("From") .. [[: %s]
|
||||
label[0.2,0.5;]] .. S("To") .. [[: %s]
|
||||
label[0.2,0.9;]] .. S("CC") .. [[: %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]
|
||||
|
||||
button[0,8.5;2,1;reply;Reply]
|
||||
button[2,8.5;2,1;replyall;Reply All]
|
||||
button[4,8.5;2,1;forward;Forward]
|
||||
button[6,8.5;2,1;delete;Delete]
|
||||
button[0,8.5;2,1;reply;]] .. S("Reply") .. [[]
|
||||
button[2,8.5;2,1;replyall;]] .. S("Reply all") .. [[]
|
||||
button[4,8.5;2,1;forward;]] .. S("Forward") .. [[]
|
||||
button[6,8.5;2,1;delete;]] .. S("Delete") .. [[]
|
||||
]] .. mail.theme
|
||||
|
||||
local from = minetest.formspec_escape(message.from) or ""
|
||||
|
@ -133,4 +133,4 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
return true
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
|
||||
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.95;2,0.5;read;Read]
|
||||
button[6,1.70;2,0.5;reply;Reply]
|
||||
button[6,2.45;2,0.5;replyall;Reply All]
|
||||
button[6,3.20;2,0.5;forward;Forward]
|
||||
button[6,3.95;2,0.5;delete;Delete]
|
||||
button[6,6.8;2,0.5;contacts;Contacts]
|
||||
button[6,7.6;2,0.5;maillists;Mail lists]
|
||||
button[6,8.7;2,0.5;about;About]
|
||||
button_exit[6,9.5;2,0.5;quit;Close]
|
||||
button[6,0.10;2,0.5;new;]] .. S("New") .. [[]
|
||||
button[6,0.95;2,0.5;read;]] .. S("Read") .. [[]
|
||||
button[6,1.70;2,0.5;reply;]] .. S("Reply") .. [[]
|
||||
button[6,2.45;2,0.5;replyall;]] .. S("Reply all") .. [[]
|
||||
button[6,3.20;2,0.5;forward;]] .. S("Forward") .. [[]
|
||||
button[6,3.95;2,0.5;delete;]] .. S("Delete") .. [[]
|
||||
button[6,6.8;2,0.5;contacts;]] .. S("Contacts") .. [[]
|
||||
button[6,7.6;2,0.5;maillists;]] .. S("Mail lists") .. [[]
|
||||
button[6,8.7;2,0.5;about;]] .. S("About") .. [[]
|
||||
button_exit[6,9.5;2,0.5;quit;]] .. S("Close") .. [[]
|
||||
|
||||
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)
|
||||
|
@ -38,7 +37,7 @@ function mail.show_sent(name)
|
|||
formspec[#formspec + 1] = minetest.formspec_escape(message.subject)
|
||||
end
|
||||
else
|
||||
formspec[#formspec + 1] = "(No subject)"
|
||||
formspec[#formspec + 1] = S("(No subject)")
|
||||
end
|
||||
end
|
||||
if mail.selected_idxs.sent[name] then
|
||||
|
@ -47,7 +46,7 @@ function mail.show_sent(name)
|
|||
end
|
||||
formspec[#formspec + 1] = "]"
|
||||
else
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;No mail]"
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No mail") .. "]"
|
||||
end
|
||||
minetest.show_formspec(name, "mail:sent", table.concat(formspec, ""))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue