From 165c20fcad1471efa4895e708a4e426365a90783 Mon Sep 17 00:00:00 2001 From: Alexander Weber Date: Tue, 14 Jan 2020 14:57:45 +0100 Subject: [PATCH] fix translation for unified_inventory Take sfinv "Skins" page name translateable --- init.lua | 3 --- locale/skinsdb.de.tr | 1 + locale/template.txt | 1 + sfinv_page.lua | 4 ++-- unified_inventory_page.lua | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 1957e02..a771df4 100644 --- a/init.lua +++ b/init.lua @@ -8,9 +8,6 @@ skins = {} skins.modpath = minetest.get_modpath(minetest.get_current_modname()) skins.default = "character" -local S = minetest.get_translator("skinsdb") -print("Translator:", dump(S)) - dofile(skins.modpath.."/skin_meta_api.lua") dofile(skins.modpath.."/api.lua") dofile(skins.modpath.."/skinlist.lua") diff --git a/locale/skinsdb.de.tr b/locale/skinsdb.de.tr index e47421c..2585624 100644 --- a/locale/skinsdb.de.tr +++ b/locale/skinsdb.de.tr @@ -15,3 +15,4 @@ see /help skinsdb for supported parameters=Lese /help für erlaubte Parameter skin set to=Skin ist jetzt invalid skin=unbekannter Skin unknown parameter=unbekannter Parameter +Skins=Aussehen diff --git a/locale/template.txt b/locale/template.txt index ff589fb..ebd2b11 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -15,3 +15,4 @@ skin set to= invalid skin= unknown parameter= unknown skin= +Skins= diff --git a/sfinv_page.lua b/sfinv_page.lua index f8d627b..5a3fcf5 100644 --- a/sfinv_page.lua +++ b/sfinv_page.lua @@ -1,4 +1,4 @@ -local S = skins.S +local S = minetest.get_translator("skinsdb") -- generate the current formspec local function get_formspec(player, context) @@ -9,7 +9,7 @@ local function get_formspec(player, context) end sfinv.register_page("skins:overview", { - title = "Skins", + title = S("Skins"), get = function(self, player, context) -- collect skins data return sfinv.make_formspec(player, context, get_formspec(player, context)) diff --git a/unified_inventory_page.lua b/unified_inventory_page.lua index a19528a..ede819a 100644 --- a/unified_inventory_page.lua +++ b/unified_inventory_page.lua @@ -1,4 +1,4 @@ -local S = skins.S +local S = minetest.get_translator("skinsdb") unified_inventory.register_page("skins", { get_formspec = function(player)