From c043aa1107c57c0a2e360deeb015d238dd13cf31 Mon Sep 17 00:00:00 2001 From: Xanthin Date: Thu, 20 Mar 2014 01:41:29 +0100 Subject: [PATCH] add support for intllib translation mod just for completeness (german tidiness?) --- bushes_classic/init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bushes_classic/init.lua b/bushes_classic/init.lua index 81e2776..40eb976 100644 --- a/bushes_classic/init.lua +++ b/bushes_classic/init.lua @@ -2,6 +2,14 @@ -- now maintained by VanessaE -- -- License: WTFPL +-- Boilerplate to support localized strings if intllib mod is installed. +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 bushes_classic = {} @@ -53,4 +61,4 @@ plantslib:spawn_on_surfaces({ minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry") -print("[Bushes] Loaded.") +print(S("[Bushes] Loaded."))