summaryrefslogtreecommitdiff
path: root/register.lua
diff options
context:
space:
mode:
Diffstat (limited to 'register.lua')
-rw-r--r--register.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/register.lua b/register.lua
index fdc39a3..8cc9123 100644
--- a/register.lua
+++ b/register.lua
@@ -195,8 +195,8 @@ local function stack_image_button(x, y, w, h, buttonname_prefix, item)
end
local recipe_text = {
- recipe = "Recipe",
- usage = "Usage",
+ recipe = "Recipe %d of %d",
+ usage = "Usage %d of %d",
}
local no_recipe_text = {
recipe = "No recipes",
@@ -310,9 +310,8 @@ unified_inventory.register_page("craftguide", {
end
if alternates and alternates > 1 then
- formspec = formspec.."label[5.5,"..(formspecy + 1.6)..";"..S(recipe_text[dir]).." "
- ..tostring(alternate).." of "
- ..tostring(alternates).."]"
+ formspec = formspec.."label[5.5,"..(formspecy + 1.6)..";"
+ ..string.format(S(recipe_text[dir]), alternate, alternates).."]"
.."button[5.5,"..(formspecy + 2)..";2,1;alternate;" .. S("Alternate") .. "]"
end
return {formspec = formspec}