mirror of
https://github.com/minetest-mods/intllib.git
synced 2025-01-23 16:30:18 +01:00
Print mod source that called deprecated intllib.Getter
.
This commit is contained in:
parent
0c308d02ac
commit
d01a9c666f
5
init.lua
5
init.lua
@ -65,8 +65,11 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function intllib.Getter(modname)
|
function intllib.Getter(modname)
|
||||||
|
local info = debug and debug.getinfo and debug.getinfo(2)
|
||||||
|
local loc = info and info.short_src..":"..info.currentline
|
||||||
minetest.log("deprecated", "intllib.Getter is deprecated."
|
minetest.log("deprecated", "intllib.Getter is deprecated."
|
||||||
.."Please use intllib.make_gettext_pair instead.")
|
.." Please use intllib.make_gettext_pair instead."
|
||||||
|
..(info and " (called from "..loc..")" or "")
|
||||||
return Getter(modname)
|
return Getter(modname)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user