Replace deprecated function 'intllib.Getter':

- Check first for 'intllib.make_gettext_pair', otherwise continue using
old function.
This commit is contained in:
AntumDeluge 2017-07-08 22:20:18 -07:00
parent 09eaddbba6
commit d7f4f7e270

View File

@ -7,7 +7,13 @@ ilights = {}
-- Boilerplate to support localized strings if intllib mod is installed. -- Boilerplate to support localized strings if intllib mod is installed.
local S local S
if minetest.global_exists("intllib") then if minetest.global_exists("intllib") then
S = intllib.Getter() if intllib.make_gettext_pair then
-- New method using gettext.
S = intllib.make_gettext_pair()
else
-- Old method using text files.
S = intllib.Getter()
end
else else
S = function(s) return s end S = function(s) return s end
end end