mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Builtin: Translatable join, leave, profiler msgs (#11064)
This commit is contained in:
parent
ee2d46dcbe
commit
a8cc3bdb08
2 changed files with 16 additions and 11 deletions
|
@ -1,5 +1,7 @@
|
|||
-- Minetest: builtin/misc.lua
|
||||
|
||||
local S = core.get_translator("__builtin")
|
||||
|
||||
--
|
||||
-- Misc. API functions
|
||||
--
|
||||
|
@ -42,15 +44,15 @@ end
|
|||
|
||||
function core.send_join_message(player_name)
|
||||
if not core.is_singleplayer() then
|
||||
core.chat_send_all("*** " .. player_name .. " joined the game.")
|
||||
core.chat_send_all("*** " .. S("@1 joined the game.", player_name))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function core.send_leave_message(player_name, timed_out)
|
||||
local announcement = "*** " .. player_name .. " left the game."
|
||||
local announcement = "*** " .. S("@1 left the game.", player_name)
|
||||
if timed_out then
|
||||
announcement = announcement .. " (timed out)"
|
||||
announcement = "*** " .. S("@1 left the game (timed out).", player_name)
|
||||
end
|
||||
core.chat_send_all(announcement)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue