From 55e8eb95d8b4028579689db23de10e57054ae665 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 27 Dec 2014 00:56:46 -0500 Subject: [PATCH] use current intllib API --- depends.txt | 1 + init.lua | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/depends.txt b/depends.txt index 4ad96d5..9207dab 100644 --- a/depends.txt +++ b/depends.txt @@ -1 +1,2 @@ default +intllib? diff --git a/init.lua b/init.lua index 60675f1..f76c4b8 100644 --- a/init.lua +++ b/init.lua @@ -5,12 +5,12 @@ autoclose_doors = {} -- Boilerplate to support localized strings if intllib mod is installed. local S -if autoclose_doors.intllib_modpath then - dofile(autoclose_doors.intllib_modpath.."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) +if minetest.get_modpath("intllib") then + S = intllib.Getter() else - S = function ( s ) return s end + S = function(s) return s end end + autoclose_doors.gettext = S --