Make some development strings translatable
This commit is contained in:
parent
fddd89d145
commit
e2ee01bda5
@ -160,16 +160,18 @@ local function update_bar(player)
|
|||||||
end
|
end
|
||||||
return tostring(val)
|
return tostring(val)
|
||||||
end
|
end
|
||||||
local text = "Hunger Debug:\n"
|
local text = S("Hunger Debug:").."\n"
|
||||||
if minetest.settings:get_bool("hunger_enable", true) then
|
if minetest.settings:get_bool("hunger_enable", true) then
|
||||||
|
-- Intentionally untranslated as these are technical values
|
||||||
text = text .. "hunger = " .. getval("hunger") .. "\n"
|
text = text .. "hunger = " .. getval("hunger") .. "\n"
|
||||||
text = text .. "saturation = " .. getval("saturation") .. "\n"
|
text = text .. "saturation = " .. getval("saturation") .. "\n"
|
||||||
text = text .. "moving = " .. getval("moving") .. "\n"
|
text = text .. "moving = " .. getval("moving") .. "\n"
|
||||||
text = text .. "active = " .. getval("active") .. "\n"
|
text = text .. "active = " .. getval("active") .. "\n"
|
||||||
text = text .. "step = " .. getval("step") .. "\n"
|
text = text .. "step = " .. getval("step") .. "\n"
|
||||||
else
|
else
|
||||||
text = text .. "<hunger disabled>\n"
|
text = text .. S("<hunger disabled>").."\n"
|
||||||
end
|
end
|
||||||
|
-- Intentionally untranslated as this is a technical value
|
||||||
text = text .. "health_step = " .. getval("health_step")
|
text = text .. "health_step = " .. getval("health_step")
|
||||||
|
|
||||||
if player_debughud[name] then
|
if player_debughud[name] then
|
||||||
|
@ -8,7 +8,7 @@ if not minetest.settings:get_bool("rp_testing_enable", false) then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Note: Intentionally NOT translated. This is a mod for development.
|
local S = minetest.get_translator("rp_testing")
|
||||||
|
|
||||||
local function dumpvec(v)
|
local function dumpvec(v)
|
||||||
return v.x..":"..v.y..":"..v.z
|
return v.x..":"..v.y..":"..v.z
|
||||||
@ -48,7 +48,7 @@ do
|
|||||||
|
|
||||||
-- List fuel recipes
|
-- List fuel recipes
|
||||||
minetest.register_chatcommand("list_fuels", {
|
minetest.register_chatcommand("list_fuels", {
|
||||||
description = "List all furnace fuels and their burntime",
|
description = S("List all furnace fuels and their burntime"),
|
||||||
privs = { debug = true },
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local fuels = {}
|
local fuels = {}
|
||||||
@ -67,14 +67,15 @@ do
|
|||||||
end
|
end
|
||||||
table.sort(fuels, sort_by_time)
|
table.sort(fuels, sort_by_time)
|
||||||
for f=1, #fuels do
|
for f=1, #fuels do
|
||||||
minetest.chat_send_player(name, fuels[f][1]..": "..fuels[f][2])
|
minetest.chat_send_player(name, S("@1: @2", fuels[f][1], fuels[f][2]))
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- List fuel recipes
|
-- List fuel recipes
|
||||||
minetest.register_chatcommand("list_cookings", {
|
minetest.register_chatcommand("list_cookings", {
|
||||||
description = "List all cooking recipes",
|
description = S("List all cooking recipes"),
|
||||||
privs = { debug = true },
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local recipes = {}
|
local recipes = {}
|
||||||
@ -93,8 +94,9 @@ do
|
|||||||
end
|
end
|
||||||
table.sort(recipes, sort_by_input)
|
table.sort(recipes, sort_by_input)
|
||||||
for r=1, #recipes do
|
for r=1, #recipes do
|
||||||
minetest.chat_send_player(name, recipes[r][1].." → "..recipes[r][2]:to_string().. " (time="..recipes[r][3]..")")
|
minetest.chat_send_player(name, S("@1 → @2 (time=@3)", recipes[r][1], recipes[r][2]:to_string(), recipes[r][3]))
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user