use current intllib API

This commit is contained in:
Vanessa Ezekowitz 2014-12-27 01:06:09 -05:00
parent bc6acccd47
commit e7f2beda39
4 changed files with 7 additions and 20 deletions

View File

@ -1,11 +1,4 @@
-- Boilerplate to support localized strings if intllib mod is installed. local S = moretrees.intllib
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
for i in ipairs(moretrees.treelist) do for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1] local treename = moretrees.treelist[i][1]

View File

@ -1,4 +1,5 @@
default default
plants_lib plants_lib
moreblocks? moreblocks?
intllib?

View File

@ -45,12 +45,12 @@ end
-- 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.get_modpath("intllib")) then if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib").."/intllib.lua") S = intllib.Getter()
S = intllib.Getter(minetest.get_current_modname())
else else
S = function ( s ) return s end S = function(s) return s end
end end
moretrees.intllib = S
-- infinite stacks checking -- infinite stacks checking

View File

@ -1,11 +1,4 @@
-- Boilerplate to support localized strings if intllib mod is installed. local S = moretrees.intllib
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
moretrees.avoidnodes = {} moretrees.avoidnodes = {}