From 304d13ac6d19ff3224479b633159b0af78ad9667 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 13 Oct 2016 06:16:03 +0200 Subject: Make missing category pages more onsistent --- init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index f552062..c58d2c2 100644 --- a/init.lua +++ b/init.lua @@ -635,8 +635,9 @@ end function doc.formspec_category(id, playername) local formstring if id == nil then - formstring = "label[0,0.5;"..F("You haven't chosen a category yet. Please choose one in the category list first.").."]" - formstring = formstring .. "button[0,1.5;3,1;doc_button_goto_main;"..F("Go to category list").."]" + formstring = "label[0,0;"..F("Help > (No Category)") .. "]" + formstring = formstring .. "label[0,0.5;"..F("You haven't chosen a category yet. Please choose one in the category list first.").."]" + formstring = formstring .. "button[0,1;3,1;doc_button_goto_main;"..F("Go to category list").."]" else formstring = "label[0,0;"..minetest.formspec_escape(string.format(S("Help > %s"), doc.data.categories[id].def.name)).."]" local total = doc.get_entry_count(id) @@ -689,7 +690,8 @@ end function doc.formspec_entry(category_id, entry_id) local formstring if category_id == nil then - formstring = "label[0,0;"..F("You haven't chosen a category yet. Please choose one in the category list first.").."]" + formstring = "label[0,0;"..F("Help > (No Category)") .. "]" + formstring = formstring .. "label[0,0.5;"..F("You haven't chosen a category yet. Please choose one in the category list first.").."]" formstring = formstring .. "button[0,1;3,1;doc_button_goto_main;"..F("Go to category list").."]" elseif entry_id == nil then formstring = "label[0,0;"..minetest.formspec_escape(string.format(S("Help > %s > (No Entry)"), doc.data.categories[category_id].def.name)) .. "]" -- cgit v1.2.3