summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua18
1 files changed, 14 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index 7bd3024..764db29 100644
--- a/init.lua
+++ b/init.lua
@@ -58,6 +58,16 @@ settings.difficult = {
hydration = true,
}
+
+-- Intllib
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s) return s end
+end
+crops.intllib = S
+
local worldpath = minetest.get_worldpath()
local modpath = minetest.get_modpath(minetest.get_current_modname())
@@ -82,15 +92,15 @@ end
if not crops.difficulty then
crops.difficulty = "normal"
- minetest.log("error", "Defaulting to \"normal\" difficulty settings")
+ minetest.log("error", S("Defaulting to \"normal\" difficulty settings"))
end
crops.settings = settings[crops.difficulty]
if not crops.settings then
- minetest.log("error", "Defaulting to \"normal\" difficulty settings")
+ minetest.log("error", S("Defaulting to \"normal\" difficulty settings"))
crops.settings = settings.normal
end
if crops.settings.hydration then
- minetest.log("action", "[crops] Hydration and dehydration mechanics are enabled.")
+ minetest.log("action", S("[crops] Hydration and dehydration mechanics are enabled."))
end
local find_plant = function(node)
@@ -99,7 +109,7 @@ local find_plant = function(node)
return crops.plants[i]
end
end
- minetest.log("error", "Unable to find plant \"" .. node.name .. "\" in crops table")
+ minetest.log("error", S("Unable to find plant").." \"".. node.name .. "\" "..S("in crops table"))
return nil
end