summaryrefslogtreecommitdiff
path: root/builtin/game/misc.lua
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-03-19 20:46:11 +0000
committerGitHub <noreply@github.com>2021-03-19 21:46:11 +0100
commita8cc3bdb0890c89d600ef6543c5e9b1b55bcf2b6 (patch)
tree39c6027553ea4ce88645f73a92ed53e57bd45bf4 /builtin/game/misc.lua
parentee2d46dcbeca010a8198ead21b759f132920fdea (diff)
downloadminetest-a8cc3bdb0890c89d600ef6543c5e9b1b55bcf2b6.tar.gz
minetest-a8cc3bdb0890c89d600ef6543c5e9b1b55bcf2b6.tar.bz2
minetest-a8cc3bdb0890c89d600ef6543c5e9b1b55bcf2b6.zip
Builtin: Translatable join, leave, profiler msgs (#11064)
Diffstat (limited to 'builtin/game/misc.lua')
-rw-r--r--builtin/game/misc.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua
index b8c5e16a9..fcb86146d 100644
--- a/builtin/game/misc.lua
+++ b/builtin/game/misc.lua
@@ -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