From 3f85e1c0da464bd67cd872dad33fe3fb29463a68 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 15 Mar 2019 07:23:36 +0100 Subject: [PATCH] Fix lava/fire/magmablock death message not transl. --- mods/HUD/mcl_death_messages/init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mods/HUD/mcl_death_messages/init.lua b/mods/HUD/mcl_death_messages/init.lua index 90943ecbf2..dc294e8daa 100644 --- a/mods/HUD/mcl_death_messages/init.lua +++ b/mods/HUD/mcl_death_messages/init.lua @@ -140,7 +140,15 @@ minetest.register_on_dieplayer(function(player, reason) else field_msg = field end - msg = S(field_msg, name) + local textdomain + if highest_damage_def.mod_origin then + textdomain = highest_damage_def.mod_origin + else + textdomain = "mcl_death_messages" + end + -- We assume the textdomain of the death message in the node definition + -- equals the modname. + msg = minetest.translate(textdomain, field_msg, name) end elseif reason.type == "drown" then msg = dmsg("drown", name)