From cde5c46e449e49e1435ac649bf344234ccd61f80 Mon Sep 17 00:00:00 2001 From: LNJ Date: Tue, 11 Apr 2017 13:02:31 +0200 Subject: Add i18n support using intllib --- init.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index ac2ca27..6c30c42 100755 --- a/init.lua +++ b/init.lua @@ -24,6 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] +-- Load support for intllib. +local MP = core.get_modpath(core.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + drawers = {} drawers.drawer_visuals = {} @@ -51,10 +55,9 @@ drawers.enable_2x2 = not core.setting_getbool("drawers_disable_2x2") -- Load files -- -local modpath = core.get_modpath("drawers") -dofile(modpath .. "/lua/helpers.lua") -dofile(modpath .. "/lua/visual.lua") -dofile(modpath .. "/lua/api.lua") +dofile(MP .. "/lua/helpers.lua") +dofile(MP .. "/lua/visual.lua") +dofile(MP .. "/lua/api.lua") -- @@ -62,7 +65,7 @@ dofile(modpath .. "/lua/api.lua") -- drawers.register_drawer("drawers:wood", { - description = "Wooden", + description = S("Wooden"), tiles1 = {"drawers_wood.png", "drawers_wood.png", "drawers_wood.png", "drawers_wood.png", "drawers_wood.png", "drawers_wood_front_1.png"}, tiles2 = {"drawers_wood.png", "drawers_wood.png", "drawers_wood.png", -- cgit v1.2.3