summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorXanthin <Xanthin@users.noreply.github.com>2014-03-20 01:31:23 +0100
committerXanthin <Xanthin@users.noreply.github.com>2014-03-20 01:31:23 +0100
commit7b32c392cf327f5c86ef3bdae0cdc94416871d49 (patch)
tree762439c2b59643a33b3bb33b86d82440e5d3df51 /init.lua
parent83307b04c39a6b56a49d25d1ecbd7879e17294e4 (diff)
add support for intllib translation mod
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/init.lua b/init.lua
index 61bfbff..17a2a2c 100644
--- a/init.lua
+++ b/init.lua
@@ -44,15 +44,13 @@ else
end
-- Boilerplate to support localized strings if intllib mod is installed.
-
local S
-if moretrees.intllib_modpath then
- dofile(moretrees.intllib_modpath.."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
+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
+ S = function ( s ) return s end
end
-moretrees.gettext = S
-- infinite stacks checking
@@ -306,4 +304,4 @@ function moretrees:grow_fir_snow(pos)
minetest.spawn_tree(pos,moretrees.fir_model)
end
-print("[Moretrees] Loaded (2013-02-11)")
+print(S("[Moretrees] Loaded (2013-02-11)"))