From f40d2c99120ed48ae13a5561ab0766dd280e7dfc Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 13 Apr 2019 18:32:54 +0200 Subject: [PATCH] lang: add a constant for the translation path --- gamecore/lang.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gamecore/lang.lua b/gamecore/lang.lua index 83ba1f5..098c0df 100644 --- a/gamecore/lang.lua +++ b/gamecore/lang.lua @@ -24,6 +24,8 @@ local LanguageManager = Object:extend() +local TRANSLATION_PATH = "datas/languages/" + -- INIT FUNCTIONS -- Initialize and configure the translation system @@ -42,11 +44,11 @@ end -- Get informations from the translation manager function LanguageManager:getTranslationData() - local _path = "datas/languages/init.lua" + local _path = TRANSLATION_PATH .. "init.lua" local fileinfo = love.filesystem.getInfo(_path) if fileinfo ~= nil then - self.datas = require "datas.languages" + self.datas = require(TRANSLATION_PATH) else self.datas = nil end