summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorLNJ <git@lnj.li>2017-04-11 13:02:31 +0200
committerLNJ <git@lnj.li>2017-04-11 13:02:31 +0200
commitcde5c46e449e49e1435ac649bf344234ccd61f80 (patch)
tree57e4d51c44d4c4a052d948f0fb73217050a58285 /init.lua
parentcb616b0df9e0a07b9e569898c1d3cc265e6c13bf (diff)
Add i18n support using intllib
Diffstat (limited to 'init.lua')
-rwxr-xr-xinit.lua13
1 files changed, 8 insertions, 5 deletions
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",