forked from mtcontrib/death_messages
Merge branch 'crabman77-translate_irc'
This commit is contained in:
commit
749320358c
10
init.lua
10
init.lua
|
@ -42,6 +42,9 @@ local sounds = {
|
|||
-- Translation wrapper
|
||||
local S = minetest.get_translator(mname)
|
||||
|
||||
-- To translate server-side in server language for irc
|
||||
local lang = minetest.settings:get("language") or "fr"
|
||||
|
||||
-- Lava death messages
|
||||
messages.lava = {
|
||||
"@1 thought lava was cool.",
|
||||
|
@ -110,7 +113,7 @@ messages.other = {
|
|||
"@1 died.",
|
||||
"@1 left this world.",
|
||||
"@1 reached miner's heaven.",
|
||||
"@1 lost him/her life.",
|
||||
"@1 lost his/her life.",
|
||||
"@1 saw the light.",
|
||||
"@1 fell from a bit too high.",
|
||||
"@1 slipped on a banana skin.",
|
||||
|
@ -141,7 +144,7 @@ messages.whacking = {
|
|||
|
||||
messages.monsters_whacking = {
|
||||
"@1 got whacked by a @2.",
|
||||
"Darwin said : @1 was less adapted than a @2.",
|
||||
"Darwin said: @1 was less adapted than a @2.",
|
||||
"@1 was transformed into a doormat by a @2.",
|
||||
"@1 thought (s)he was stronger than a @2.",
|
||||
"@1 got kicked up by a @2. Next up...",
|
||||
|
@ -208,7 +211,8 @@ local function broadcast_death(msg)
|
|||
logfilep:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. msg .. "\n")
|
||||
logfilep:close()
|
||||
if irc then
|
||||
irc.say(msg)
|
||||
local tr_msg = minetest.get_translated_string(lang, msg)
|
||||
irc.say(tr_msg)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user