Add translation support

This commit is contained in:
Louis Royer
2020-03-08 22:15:00 +01:00
committed by SmallJoker
parent aca830fd22
commit 4179917eb4
8 changed files with 324 additions and 169 deletions

View File

@ -1,3 +1,4 @@
local S = minetest.get_translator("areas")
local old_is_protected = minetest.is_protected
function minetest.is_protected(pos, name)
@ -11,7 +12,7 @@ minetest.register_on_protection_violation(function(pos, name)
if not areas:canInteract(pos, name) then
local owners = areas:getNodeOwners(pos)
minetest.chat_send_player(name,
("%s is protected by %s."):format(
S("@1 is protected by @2.",
minetest.pos_to_string(pos),
table.concat(owners, ", ")))
end