mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-29 05:10:25 +02:00
Add support for MT 5 game translation (rebasing ) (#2466)
rebased #2368
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
-- default/furnace.lua
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
--
|
||||
-- Formspecs
|
||||
@ -60,7 +64,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||
if listname == "fuel" then
|
||||
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
||||
if inv:is_empty("src") then
|
||||
meta:set_string("infotext", "Furnace is empty")
|
||||
meta:set_string("infotext", S("Furnace is empty"))
|
||||
end
|
||||
return stack:get_count()
|
||||
else
|
||||
@ -209,19 +213,19 @@ local function furnace_node_timer(pos, elapsed)
|
||||
if cookable then
|
||||
item_percent = math.floor(src_time / cooked.time * 100)
|
||||
if dst_full then
|
||||
item_state = "100% (output full)"
|
||||
item_state = S("100% (output full)")
|
||||
else
|
||||
item_state = item_percent .. "%"
|
||||
item_state = S("@1%", item_percent)
|
||||
end
|
||||
else
|
||||
if srclist[1]:is_empty() then
|
||||
item_state = "Empty"
|
||||
item_state = S("Empty")
|
||||
else
|
||||
item_state = "Not cookable"
|
||||
item_state = S("Not cookable")
|
||||
end
|
||||
end
|
||||
|
||||
local fuel_state = "Empty"
|
||||
local fuel_state = S("Empty")
|
||||
local active = "inactive"
|
||||
local result = false
|
||||
|
||||
@ -243,8 +247,9 @@ local function furnace_node_timer(pos, elapsed)
|
||||
minetest.get_node_timer(pos):stop()
|
||||
end
|
||||
|
||||
local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
|
||||
"; Fuel: " .. fuel_state .. ")"
|
||||
-- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
|
||||
-- "; Fuel: " .. fuel_state .. ")"
|
||||
local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active, item_state, fuel_state)
|
||||
|
||||
--
|
||||
-- Set meta values
|
||||
@ -263,7 +268,7 @@ end
|
||||
--
|
||||
|
||||
minetest.register_node("default:furnace", {
|
||||
description = "Furnace",
|
||||
description = S("Furnace"),
|
||||
tiles = {
|
||||
"default_furnace_top.png", "default_furnace_bottom.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
@ -311,7 +316,7 @@ minetest.register_node("default:furnace", {
|
||||
})
|
||||
|
||||
minetest.register_node("default:furnace_active", {
|
||||
description = "Furnace",
|
||||
description = S("Furnace"),
|
||||
tiles = {
|
||||
"default_furnace_top.png", "default_furnace_bottom.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
|
Reference in New Issue
Block a user