From 7aaafdca03cea0bc42dc9f6256b3d6b3229071fb Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 16 Mar 2019 03:18:16 +0100 Subject: [PATCH] Translate a few missing formspec elements --- mods/ITEMS/mcl_beds/functions.lua | 21 ++++++++++--------- mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr | 7 +++++++ mods/ITEMS/mcl_beds/locale/template.txt | 7 +++++++ mods/ITEMS/mcl_crafting_table/init.lua | 2 +- .../locale/mcl_crafting_table.de.tr | 1 + .../mcl_crafting_table/locale/template.txt | 1 + mods/ITEMS/mcl_furnaces/init.lua | 4 ++-- .../mcl_furnaces/locale/mcl_furnaces.de.tr | 1 + mods/ITEMS/mcl_furnaces/locale/template.txt | 1 + 9 files changed, 32 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 3a4877a68..73e1cebcb 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -1,4 +1,5 @@ local S = minetest.get_translator("mcl_beds") +local F = minetest.formspec_escape local pi = math.pi local player_in_bed = 0 @@ -201,8 +202,8 @@ local function update_formspecs(finished) local form_n = "size[8,15;true]" local all_in_bed = ges == player_in_bed local night_skip = is_night_skip_enabled() - local button_leave = "button_exit[2,12;4,0.75;leave;Leave bed]" - local button_abort = "button_exit[2,12;4,0.75;leave;Abort sleep]" + local button_leave = "button_exit[2,12;4,0.75;leave;"..F(S("Leave bed")).."]" + local button_abort = "button_exit[2,12;4,0.75;leave;"..F(S("Abort sleep")).."]" local bg_presleep = "bgcolor[#00000080;true]" local bg_sleep = "bgcolor[#000000FF;true]" @@ -212,33 +213,33 @@ local function update_formspecs(finished) end return elseif not is_sp then - local text = string.format("Players in bed: %d/%d", player_in_bed, ges) + local text = S("Players in bed: @1/@2", player_in_bed, ges) if not night_skip then - text = text .. "\n" .. "Note: Night skip is disabled." + text = text .. "\n" .. S("Note: Night skip is disabled.") form_n = form_n .. bg_presleep form_n = form_n .. button_leave elseif all_in_bed then - text = text .. "\n" .. "You're sleeping." + text = text .. "\n" .. S("You're sleeping.") form_n = form_n .. bg_sleep form_n = form_n .. button_abort else - text = text .. "\n" .. "You will fall asleep when all players are in bed." + text = text .. "\n" .. S("You will fall asleep when all players are in bed.") form_n = form_n .. bg_presleep form_n = form_n .. button_leave end - form_n = form_n .. "label[2.2,7.5;"..minetest.formspec_escape(text).."]" + form_n = form_n .. "label[2.2,7.5;"..F(text).."]" else local text if night_skip then - text = "You're sleeping." + text = S("You're sleeping.") form_n = form_n .. bg_sleep form_n = form_n .. button_abort else - text = "You're in bed." .. "\n" .. "Note: Night skip is disabled." + text = S("You're in bed.") .. "\n" .. S("Note: Night skip is disabled.") form_n = form_n .. bg_presleep form_n = form_n .. button_leave end - form_n = form_n .. "label[2.2,7.5;"..minetest.formspec_escape(text).."]" + form_n = form_n .. "label[2.2,7.5;"..F(text).."]" end for name,_ in pairs(mcl_beds.player) do diff --git a/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr b/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr index 1404bbf84..bcf26fc3e 100644 --- a/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr +++ b/mods/ITEMS/mcl_beds/locale/mcl_beds.de.tr @@ -30,3 +30,10 @@ It's too dangerous to sleep here!=Es ist zu gefährlich, hier zu schlafen! New respawn position set! But you can only sleep at night or during a thunderstorm.=Neue Wiedereinstiegsposition gesetzt! Aber Sie können nur nachts oder während eines Gewittersturms schlafen. You can only sleep at night or during a thunderstorm.=Sie können nur nachts oder während eines Gewittersturms schlafen. New respawn position set!=Neue Wiedereinstiegsposition gesetzt! +Leave bed=Bett verlassen +Abort sleep=Schlaf abbrechen +Players in bed: @1/@2=Spieler im Bett: @1/@2 +Note: Night skip is disabled.=Anmerkung: Überspringen der Nacht deaktiviert. +You're sleeping.=Sie schlafen. +You will fall asleep when all players are in bed.=Sie werden einschlafen, wenn alle Spieler im Bett sind. +You're in bed.=Sie sind im Bett. diff --git a/mods/ITEMS/mcl_beds/locale/template.txt b/mods/ITEMS/mcl_beds/locale/template.txt index 13901c198..0cba8424f 100644 --- a/mods/ITEMS/mcl_beds/locale/template.txt +++ b/mods/ITEMS/mcl_beds/locale/template.txt @@ -30,3 +30,10 @@ It's too dangerous to sleep here!= New respawn position set! But you can only sleep at night or during a thunderstorm.= You can only sleep at night or during a thunderstorm.= New respawn position set!= +Leave bed= +Abort sleep= +Players in bed: @1/@2= +Note: Night skip is disabled.= +You're sleeping.= +You will fall asleep when all players are in bed.= +You're in bed.= diff --git a/mods/ITEMS/mcl_crafting_table/init.lua b/mods/ITEMS/mcl_crafting_table/init.lua index cfe867c28..8cc51ac90 100644 --- a/mods/ITEMS/mcl_crafting_table/init.lua +++ b/mods/ITEMS/mcl_crafting_table/init.lua @@ -22,7 +22,7 @@ minetest.register_node("mcl_crafting_table:crafting_table", { "list[current_player;craft;1.75,0.5;3,3;]".. "list[current_player;craftpreview;6.1,1.5;1,1;]".. "image_button[0.75,1.5;1,1;craftguide_book.png;__mcl_craftguide;]".. - "tooltip[__mcl_craftguide;Recipe book]".. + "tooltip[__mcl_craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_player;main]".. "listring[current_player;craft]" diff --git a/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr b/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr index 5831b881c..3db0460b6 100644 --- a/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr +++ b/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.de.tr @@ -2,3 +2,4 @@ Crafting Table=Werkbank A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.=Die Werkbank ist ein Block, mit dem Sie Zugriff auf ein 3×3-Fertigungsgitter erhalten, wodurch sie fortgeschrittene Dinge herstellen können. Rightclick the crafting table to access the 3×3 crafting grid.=Rechtsklicken Sie auf die Werkbank, um auf das 3×3-Fertigungsgitter zuzugreifen. +Recipe book=Fertigungsbuch diff --git a/mods/ITEMS/mcl_crafting_table/locale/template.txt b/mods/ITEMS/mcl_crafting_table/locale/template.txt index bd0e5879a..f08bf3a72 100644 --- a/mods/ITEMS/mcl_crafting_table/locale/template.txt +++ b/mods/ITEMS/mcl_crafting_table/locale/template.txt @@ -2,3 +2,4 @@ Crafting Table= A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.= Rightclick the crafting table to access the 3×3 crafting grid.= +Recipe book= diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index d96bdf881..0d19a684e 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -19,7 +19,7 @@ local function active_formspec(fuel_percent, item_percent) "image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[lowpart:".. (item_percent)..":gui_furnace_arrow_fg.png^[transformR270]".. "image_button[8,0;1,1;craftguide_book.png;craftguide;]".. - "tooltip[craftguide;Recipe book]".. + "tooltip[craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_name;dst]".. "listring[current_player;main]".. "listring[current_name;src]".. @@ -39,7 +39,7 @@ local inactive_formspec = "size[9,8.75]".. "image[2.75,1.5;1,1;default_furnace_fire_bg.png]".. "image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[transformR270]".. "image_button[8,0;1,1;craftguide_book.png;craftguide;]".. - "tooltip[craftguide;Recipe book]".. + "tooltip[craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_name;dst]".. "listring[current_player;main]".. "listring[current_name;src]".. diff --git a/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr b/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr index 34ea30b86..0480499c2 100644 --- a/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr +++ b/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.de.tr @@ -4,3 +4,4 @@ Furnaces cook or smelt several items, using a furnace fuel, into something else. Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.=Benutzen Sie den Ofen, um das Ofenmenü zu öffnen. Platzieren Sie einen Brennstoff in den unteren Platz und das Quellmaterial in den oberen Platz. Der Ofen wird langsam seinen Brennstoff benutzen, um den Gegenstand zu schmelzen. Das Ergebnis landet im Ausgabeplatz rechts. Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=Benutzen Sie das Rezeptbuch, um zu sehen, was Sie schmelzen können und was Sie als Brennstoff benutzen können und wie lange dieser brennt. Burning Furnace=Aktiver Ofen +Recipe book=Fertigungsbuch diff --git a/mods/ITEMS/mcl_furnaces/locale/template.txt b/mods/ITEMS/mcl_furnaces/locale/template.txt index fee08e5a2..7d75ec283 100644 --- a/mods/ITEMS/mcl_furnaces/locale/template.txt +++ b/mods/ITEMS/mcl_furnaces/locale/template.txt @@ -4,3 +4,4 @@ Furnaces cook or smelt several items, using a furnace fuel, into something else. Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.= Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.= Burning Furnace= +Recipe book=