diff --git a/computer/depends.txt b/computer/depends.txt index 4ad96d51..c48fe0d0 100644 --- a/computer/depends.txt +++ b/computer/depends.txt @@ -1 +1,3 @@ default +intllib? + diff --git a/computer/miscitems.lua b/computer/miscitems.lua index 7ce63de5..15e66a93 100644 --- a/computer/miscitems.lua +++ b/computer/miscitems.lua @@ -5,12 +5,11 @@ -- This file defines some items in order to not have to depend on other mods. -- Boilerplate to support localized strings if intllib mod is installed. -local S; -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua"); - S = intllib.Getter(minetest.get_current_modname()); +local S +if minetest.get_modpath("intllib") then + S = intllib.Getter() else - S = function ( s ) return s; end + S = function(s) return s end end if (not minetest.get_modpath("homedecor")) then diff --git a/homedecor/depends.txt b/homedecor/depends.txt index 4c32571c..4e03f52a 100644 --- a/homedecor/depends.txt +++ b/homedecor/depends.txt @@ -5,3 +5,4 @@ moreblocks? technic? dye? bees? +intllib? diff --git a/homedecor/init.lua b/homedecor/init.lua index 7413c554..49b952ce 100644 --- a/homedecor/init.lua +++ b/homedecor/init.lua @@ -20,11 +20,10 @@ homedecor.intllib_modpath = minetest.get_modpath("intllib") -- Boilerplate to support localized strings if intllib mod is installed. local S -if homedecor.intllib_modpath then - dofile(homedecor.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 homedecor.gettext = S diff --git a/signs_lib/depends.txt b/signs_lib/depends.txt index 4ad96d51..c48fe0d0 100644 --- a/signs_lib/depends.txt +++ b/signs_lib/depends.txt @@ -1 +1,3 @@ default +intllib? + diff --git a/signs_lib/init.lua b/signs_lib/init.lua index 5622571f..1ce460d0 100644 --- a/signs_lib/init.lua +++ b/signs_lib/init.lua @@ -69,12 +69,12 @@ signs_lib.sign_post_model = { } } +-- Boilerplate to support localized strings if intllib mod is installed. local S -if signs_lib.intllib_modpath then - dofile(signs_lib.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 signs_lib.gettext = S