Don't translate player names
- Simplify wield item player owner display - Don't try to translate player names
This commit is contained in:
parent
be71e234d4
commit
19e4a225e0
@ -16,10 +16,14 @@ minetest.register_on_mods_loaded(function() loadtimeover = true end)
|
||||
local prefix = minetest.translate(modname, "x")
|
||||
prefix = prefix:sub(1, prefix:find(modname) - 1)
|
||||
|
||||
local passthru = "@1"
|
||||
|
||||
function nodecore.translate_inform(str)
|
||||
if (not str) or (type(str) ~= "string") or (not string_match(str, "%S"))
|
||||
or (str:sub(1, #prefix) == prefix) then return end
|
||||
|
||||
if str == passthru then return true end
|
||||
|
||||
if not strings[str] then
|
||||
if loadtimeover then
|
||||
nodecore.log("warning", string_format(
|
||||
@ -38,6 +42,10 @@ function nodecore.translate(str, ...)
|
||||
return minetest.translate(modname, str, ...)
|
||||
end
|
||||
|
||||
function nodecore.notranlsate(str)
|
||||
return nodecore.translate(passthru, str)
|
||||
end
|
||||
|
||||
if nodecore.infodump() then
|
||||
nodecore.register_globalstep("translate templates", function()
|
||||
if not strings_dirty then return end
|
||||
|
@ -148,7 +148,7 @@ entdef = {
|
||||
local stack = inv:get_stack("main", slot)
|
||||
|
||||
nodecore.show_touchtip(puncher, nodecore.touchtip_stack(stack)
|
||||
.. "\n" .. conf.pname .. "'s Inventory")
|
||||
.. "\n" .. nodecore.notranslate(conf.pname))
|
||||
|
||||
local stime = self.swipetime or 0
|
||||
local dofx = stime < nodecore.gametime - steal_fxtime
|
||||
|
Loading…
x
Reference in New Issue
Block a user