From 9d7f4f65440b95d38d42dffc1f3fa391bd71ec19 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 16 Mar 2019 04:14:21 +0100 Subject: [PATCH] Translate villager professions --- mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr | 13 ++++++++++ mods/ENTITIES/mobs_mc/locale/template.txt | 13 ++++++++++ mods/ENTITIES/mobs_mc/villager.lua | 29 +++++++++++----------- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr index ce21cf817..ecf058b4a 100644 --- a/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr @@ -58,3 +58,16 @@ Golden Horse Armor=Goldpferderüstung Golden horse armor can be worn by horses to increase their protection from harm.=Eine Goldpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden zu erhöhen. Diamond Horse Armor=Diamantpferderüstung Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Eine Diamantpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden beträchtlich zu erhöhen. +Farmer=Bauer +Fisherman=Fischer +Fletcher=Pfeilmacher +Shepherd=Schäfer +Librarian=Bibliothekar +Cartographer=Kartograph +Armorer=Rüstungsschmied +Leatherworker=Lederarbeiter +Butcher=Metzger +Weapon Smith=Waffenschmied +Tool Smith=Werkzeugschmied +Cleric=Priester +Nitwit=Dorftrottel diff --git a/mods/ENTITIES/mobs_mc/locale/template.txt b/mods/ENTITIES/mobs_mc/locale/template.txt index 6b36cc8fd..d2c7c2393 100644 --- a/mods/ENTITIES/mobs_mc/locale/template.txt +++ b/mods/ENTITIES/mobs_mc/locale/template.txt @@ -58,3 +58,16 @@ Golden Horse Armor= Golden horse armor can be worn by horses to increase their protection from harm.= Diamond Horse Armor= Diamond horse armor can be worn by horses to greatly increase their protection from harm.= +Farmer= +Fisherman= +Fletcher= +Shepherd= +Librarian= +Cartographer= +Armorer= +Leatherworker= +Butcher= +Weapon Smith= +Tool Smith= +Cleric= +Nitwit= diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 4357cebcc..4c73524f9 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -20,6 +20,7 @@ -- TODO: Farm stuff local S = minetest.get_translator("mobs_mc") +local N = function(s) return s end -- playername-indexed table containing the previously used tradenum local player_tradenum = {} @@ -61,7 +62,7 @@ end local professions = { farmer = { - name = "Farmer", + name = N("Farmer"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -91,7 +92,7 @@ local professions = { } }, fisherman = { - name = "Fisherman", + name = N("Fisherman"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -103,7 +104,7 @@ local professions = { }, }, fletcher = { - name = "Fletcher", + name = N("Fletcher"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -118,7 +119,7 @@ local professions = { } }, shepherd ={ - name = "Shepherd", + name = N("Shepherd"), texture = "mobs_mc_villager_farmer.png", trades = { { @@ -147,7 +148,7 @@ local professions = { }, }, librarian = { - name = "Librarian", + name = N("Librarian"), texture = "mobs_mc_villager_librarian.png", trades = { { @@ -176,7 +177,7 @@ local professions = { }, }, cartographer = { - name = "Cartographer", + name = N("Cartographer"), texture = "mobs_mc_villager_librarian.png", trades = { { @@ -197,7 +198,7 @@ local professions = { }, }, armorer = { - name = "Armorer", + name = N("Armorer"), texture = "mobs_mc_villager_smith.png", trades = { { @@ -225,7 +226,7 @@ local professions = { }, }, leatherworker = { - name = "Leatherworker", + name = N("Leatherworker"), texture = "mobs_mc_villager_butcher.png", trades = { { @@ -244,7 +245,7 @@ local professions = { }, }, butcher = { - name = "Butcher", + name = N("Butcher"), texture = "mobs_mc_villager_butcher.png", trades = { { @@ -260,7 +261,7 @@ local professions = { }, }, weapon_smith = { - name = "Weapon Smith", + name = N("Weapon Smith"), texture = "mobs_mc_villager_smith.png", trades = { { @@ -284,7 +285,7 @@ local professions = { }, }, tool_smith = { - name = "Tool Smith", + name = N("Tool Smith"), texture = "mobs_mc_villager_smith.png", trades = { { @@ -307,7 +308,7 @@ local professions = { }, }, cleric = { - name = "Cleric", + name = N("Cleric"), texture = "mobs_mc_villager_priest.png", trades = { { @@ -330,7 +331,7 @@ local professions = { }, }, nitwit = { - name = "Nitwit", + name = N("Nitwit"), texture = "mobs_mc_villager.png", -- No trades for nitwit trades = nil, @@ -490,7 +491,7 @@ local function show_trade_formspec(playername, trader, tradenum) .."background[-0.19,-0.25;9.41,9.49;mobs_mc_trading_formspec_bg.png]" ..disabled_img ..mcl_vars.inventory_header - .."label[4,0;"..minetest.formspec_escape(profession).."]" + .."label[4,0;"..minetest.formspec_escape(minetest.colorize("#313131", S(profession))).."]" .."list[current_player;main;0,4.5;9,3;9]" .."list[current_player;main;0,7.74;9,1;]" ..b_prev..b_next