Localize get_translator
call
This commit is contained in:
parent
59667bd35c
commit
1bffd98132
2
api.lua
2
api.lua
@ -1,7 +1,7 @@
|
||||
-- see: mail.md
|
||||
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local f = string.format
|
||||
|
||||
|
3
init.lua
3
init.lua
@ -5,6 +5,9 @@ mail = {
|
||||
-- mod storage
|
||||
storage = minetest.get_mod_storage(),
|
||||
|
||||
-- translation
|
||||
S = minetest.get_translator(minetest.get_current_modname()),
|
||||
|
||||
-- ui theme prepend
|
||||
theme = "",
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
minetest.after(2, function(name)
|
||||
|
@ -1,4 +1,6 @@
|
||||
local S = minetest.get_translator("mail")
|
||||
-- translation
|
||||
local S = mail.S
|
||||
|
||||
local has_canonical_name = minetest.get_modpath("canonical_name")
|
||||
|
||||
mail.register_on_player_receive(function(name, msg)
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:about"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:compose"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:contacts"
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
|
||||
local S = mail.S
|
||||
|
||||
function mail.show_drafts(name)
|
||||
local trash_tab = ""
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:editcontact"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:editmaillist"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
function mail.show_inbox(name, sortfieldindex, sortdirection, filter)
|
||||
sortfieldindex = tonumber(sortfieldindex or mail.selected_idxs.sortfield[name])
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:maillists"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:message"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
function mail.show_outbox(name, sortfieldindex, sortdirection, filter)
|
||||
sortfieldindex = tonumber(sortfieldindex or mail.selected_idxs.sortfield[name])
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:selectcontact"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local FORMNAME = "mail:settings"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
local trash_formspec = "size[8.5,11;]" .. mail.theme .. [[
|
||||
tabheader[0.3,1;boxtab;]] ..
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
function mail.compile_contact_list(name, selected, playernames)
|
||||
-- TODO: refactor this - not just compiles *a* list, but *the* list for the contacts screen (too inflexible)
|
||||
|
@ -1,4 +1,5 @@
|
||||
local S = minetest.get_translator("mail")
|
||||
-- translation
|
||||
local S = mail.S
|
||||
|
||||
local function recursive_expand_recipient_names(sender, list, is_toplevel, recipients, undeliverable)
|
||||
for _, name in ipairs(list) do
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
mail.settings = {
|
||||
chat_notifications = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- translation
|
||||
local S = minetest.get_translator("mail")
|
||||
local S = mail.S
|
||||
|
||||
function mail.time_ago(t)
|
||||
local elapsed = os.time() - t
|
||||
|
Loading…
Reference in New Issue
Block a user