Makes translatable some straggler-strings
That is, progressive mode notifications, backpack names, and a couple of chat messages.
This commit is contained in:
parent
1ba3ff8d5d
commit
0ddcab3172
|
@ -14,10 +14,16 @@ Items=
|
|||
There is already a bag=
|
||||
This is not a bag=
|
||||
@1 (@2% full)=
|
||||
Small Backpack=
|
||||
Medium Backpack=
|
||||
Large Backpack=
|
||||
Teleported to: @1=
|
||||
Waypoints limit reached (@1)=
|
||||
You already have set a waypoint at this position=
|
||||
Welcome back home!=
|
||||
'home' privilege missing=
|
||||
Your Minetest client needs updating (www.minetest.net)=
|
||||
No home set=
|
||||
Any dye=
|
||||
Any coal=
|
||||
Any sand=
|
||||
|
@ -82,7 +88,6 @@ No=
|
|||
Home=
|
||||
Style=
|
||||
Sorting=
|
||||
No home set=
|
||||
Set home=
|
||||
Hide tabs=
|
||||
HUD description=
|
||||
|
@ -133,3 +138,6 @@ Collect items to reveal more recipes=
|
|||
Click to hide=
|
||||
Click to expand=
|
||||
Bookmarks=
|
||||
Unlocked=
|
||||
New recipe unlocked!=
|
||||
@1 new recipes unlocked!=
|
||||
|
|
|
@ -156,11 +156,15 @@ local bag_recipes = {
|
|||
},
|
||||
}
|
||||
|
||||
-- For detection by update_translations script.
|
||||
-- S('Small Backpack')
|
||||
-- S('Medium Backpack')
|
||||
-- S('Large Backpack')
|
||||
for size, item in pairs(bag_recipes) do
|
||||
local bagname = fmt("i4:bag_%s", size)
|
||||
|
||||
core.register_craftitem(bagname, {
|
||||
description = fmt("%s Backpack", size:gsub("^%l", string.upper)),
|
||||
description = S(fmt("%s Backpack", size:gsub("^%l", string.upper))),
|
||||
inventory_image = fmt("i3_bag_%s.png", size),
|
||||
groups = {bag = item.size},
|
||||
stack_max = 1,
|
||||
|
|
|
@ -138,7 +138,7 @@ local function inv_fields(player, data, fields)
|
|||
|
||||
if #data.waypoints >= max_waypoints then
|
||||
play_sound(name, "i3_cannot", 0.8)
|
||||
return msg(name, fmt("Waypoints limit reached (%u)", max_waypoints))
|
||||
return msg(name, S("Waypoints limit reached (@1)", max_waypoints))
|
||||
end
|
||||
|
||||
local pos = player:get_pos()
|
||||
|
@ -392,13 +392,13 @@ local function home_footer_fields(player, data, fields)
|
|||
-- Use minetest_game’s sethome API, if available.
|
||||
if sethome then
|
||||
if not sethome.go(name) then
|
||||
msg(name, "No home set")
|
||||
msg(name, S("No home set"))
|
||||
else
|
||||
msg(name, S("Welcome back home!"))
|
||||
end
|
||||
-- Otherwise, use i4’s home.
|
||||
elseif not data.home then
|
||||
msg(name, "No home set")
|
||||
msg(name, S("No home set"))
|
||||
elseif name then
|
||||
safe_teleport(player, str_to_pos(data.home))
|
||||
msg(name, S("Welcome back home!"))
|
||||
|
@ -424,7 +424,7 @@ end
|
|||
local function settings_footer_fields(player, data, fields)
|
||||
local name = player:get_player_name()
|
||||
if fields.set_home and not check_privs(name, {home = true}) then
|
||||
return msg(name, "'home' privilege missing")
|
||||
return msg(name, S("'home' privilege missing"))
|
||||
elseif fields.set_home then
|
||||
if sethome then
|
||||
sethome.set(name, player:get_pos())
|
||||
|
|
|
@ -2,14 +2,14 @@ local set_fs = i4.set_fs
|
|||
local hud_notif = i4.hud_notif
|
||||
local POLL_FREQ = 0.25
|
||||
|
||||
IMPORT("reg_items", "reg_nodes", "fmt", "table_merge", "array_diff")
|
||||
IMPORT("reg_items", "reg_nodes", "fmt", "S", "table_merge", "array_diff")
|
||||
IMPORT("is_group", "extract_groups", "item_has_groups", "apply_recipe_filters", "sort_by_category")
|
||||
|
||||
i4.remove_minitab"nodes"
|
||||
i4.remove_minitab"items"
|
||||
|
||||
i4.new_minitab("unlocked", {
|
||||
description = "Unlocked",
|
||||
description = S("Unlocked"),
|
||||
|
||||
sorter = function(item, data)
|
||||
return data.items_progress[item]
|
||||
|
@ -142,7 +142,10 @@ local function poll_new_items(player, data, join)
|
|||
data.discovered = data.known_recipes - oldknown
|
||||
|
||||
if data.discovered > 0 then
|
||||
local msg = fmt("%u new recipe%s unlocked!", data.discovered, data.discovered > 1 and "s" or "")
|
||||
local msg = S("New recipe unlocked!")
|
||||
if data.discovered > 1 then
|
||||
msg = S("@1 new recipes unlocked!", data.discovered)
|
||||
end
|
||||
local last_discovered = diff[1]
|
||||
local img = reg_items[last_discovered].inventory_image
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue