mirror of
https://github.com/mt-mods/moretrees.git
synced 2024-12-25 02:00:23 +01:00
add support for intllib translation mod
This commit is contained in:
parent
83307b04c3
commit
7b32c392cf
12
init.lua
12
init.lua
@ -44,15 +44,13 @@ else
|
|||||||
end
|
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 moretrees.intllib_modpath then
|
if (minetest.get_modpath("intllib")) then
|
||||||
dofile(moretrees.intllib_modpath.."/intllib.lua")
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
S = intllib.Getter(minetest.get_current_modname())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function ( s ) return s end
|
S = function ( s ) return s end
|
||||||
end
|
end
|
||||||
moretrees.gettext = S
|
|
||||||
|
|
||||||
-- infinite stacks checking
|
-- infinite stacks checking
|
||||||
|
|
||||||
@ -306,4 +304,4 @@ function moretrees:grow_fir_snow(pos)
|
|||||||
minetest.spawn_tree(pos,moretrees.fir_model)
|
minetest.spawn_tree(pos,moretrees.fir_model)
|
||||||
end
|
end
|
||||||
|
|
||||||
print("[Moretrees] Loaded (2013-02-11)")
|
print(S("[Moretrees] Loaded (2013-02-11)"))
|
||||||
|
Loading…
Reference in New Issue
Block a user