From 8ffc8e9323723b8b96b6a0495ac9be8d0d701f9b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 6 Aug 2016 16:34:16 +0200 Subject: Fix translation strings for recipe alternations --- register.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'register.lua') 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} -- cgit v1.2.3