Fix intllib boilerplate code

This commit is contained in:
sys4-fr 2016-11-25 05:57:04 +01:00
parent 2fdb6a3bd1
commit d4a6f54488
2 changed files with 4 additions and 6 deletions

View File

@ -8,9 +8,8 @@
-- Boilerplate to support localized strings if intllib mod is installed.
local S = 0
if rawget(_G, "intllib") then
dofile(minetest.get_modpath("intllib").."/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
end

View File

@ -13,9 +13,8 @@ dofile(minetest.get_modpath("food_basic").."/ingredients.lua")
-- Boilerplate to support localized strings if intllib mod is installed.
local S = 0
if rawget(_G, "intllib") then
dofile(minetest.get_modpath("intllib").."/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
end