Replace deprecated function 'intllib.Getter':
- Check first for 'intllib.make_gettext_pair', otherwise continue using old function.
This commit is contained in:
parent
09eaddbba6
commit
d7f4f7e270
6
init.lua
6
init.lua
@ -7,7 +7,13 @@ ilights = {}
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if minetest.global_exists("intllib") then
|
||||
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
|
||||
S = function(s) return s end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user