Skip to content

Commit af03f94

Browse files
BuckarooBanzayAthozus
authored andcommitted
declare the translator in every module instead of a global
1 parent 4d4fd90 commit af03f94

12 files changed

+30
-5
lines changed

.luacheckrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
allow_defined_top = true
2-
31
globals = {
42
"mail",
53
}

init.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ if minetest.get_modpath("default") then
3131
mail.theme = default.gui_bg .. default.gui_bg_img
3232
end
3333

34-
-- translation
35-
S = minetest.get_translator("mail")
36-
3734
-- sub files
3835
local MP = minetest.get_modpath(minetest.get_current_modname())
3936
dofile(MP .. "/util/normalize.lua")

ui/compose.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local FORMNAME = "mail:compose"
25
local msg_id = {}
36

ui/contacts.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local FORMNAME = "mail:contacts"
25

36
local contacts_formspec = "size[8,9;]" .. mail.theme .. [[

ui/drafts.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local drafts_formspec = "size[8.5,10;]" .. mail.theme .. [[
25
tabheader[0.3,1;boxtab;]] .. S("Inbox") .. "," .. S("Sent messages").. "," .. S("Drafts") .. [[;3;false;false]
36

ui/edit_contact.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local FORMNAME = "mail:editcontact"
25

36
function mail.show_edit_contact(name, contact_name, note, illegal_name_hint)

ui/edit_maillists.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local FORMNAME = "mail:editmaillist"
25

36
function mail.show_edit_maillist(playername, maillist_name, desc, players, illegal_name_hint)

ui/inbox.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local inbox_formspec = "size[8.5,10;]" .. mail.theme .. [[
25
tabheader[0.3,1;boxtab;]] .. S("Inbox") .. "," .. S("Sent messages").. "," .. S("Drafts") .. [[;1;false;false]
36

ui/maillists.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local FORMNAME = "mail:maillists"
25

36
local maillists_formspec = "size[8,9;]" .. mail.theme .. [[

ui/message.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- translation
2+
local S = minetest.get_translator("mail")
3+
14
local FORMNAME = "mail:message"
25

36
function mail.show_message(name, id)

0 commit comments

Comments
 (0)