[overrides] Replace deprecated function 'intllib.Getter':

- Check first for 'intllib.make_gettext_pair', otherwise continue using
function 'intllib.Getter'.
master
AntumDeluge 2017-07-09 12:17:15 -07:00
parent a297063491
commit f643879f3e
2 changed files with 10 additions and 2 deletions

View File

@ -29,7 +29,11 @@
local S
if minetest.global_exists("intllib") then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter("animalmaterials")
if intllib.make_gettext_pair then
S = intllib.make_gettext_pair("animalmaterials")
else
S = intllib.Getter("animalmaterials")
end
else
S = function ( s ) return s end
end

View File

@ -29,7 +29,11 @@
local S
if minetest.global_exists("intllib") then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter("mobs")
if intllib.make_gettext_pair then
S = intllib.make_gettext_pair("mobs")
else
S = intllib.Getter("mobs")
end
else
S = function ( s ) return s end
end