From d7f4f7e27083247c5f387fa707bd181b34623fbb Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Sat, 8 Jul 2017 22:20:18 -0700 Subject: [PATCH] Replace deprecated function 'intllib.Getter': - Check first for 'intllib.make_gettext_pair', otherwise continue using old function. --- init.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5763826..ed6f6e5 100644 --- a/init.lua +++ b/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 - 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 S = function(s) return s end end