Rewrite unknown node error message

master
Wuzzy 2019-03-16 08:30:43 +01:00
parent 1888cab8a5
commit be2db67da9
3 changed files with 25 additions and 16 deletions

View File

@ -22,7 +22,7 @@ doc_identifier.identify = function(itemstack, user, pointed_thing)
elseif itype == "error_node" then
message = S("No help entry for this block could be found.")
elseif itype == "error_unknown" then
vsize = vsize + 3
vsize = vsize + 2
local mod
if param ~= nil then
local colon = string.find(param, ":")
@ -30,20 +30,23 @@ doc_identifier.identify = function(itemstack, user, pointed_thing)
mod = string.sub(param,1,colon-1)
end
end
message = S("Error: This node, item or object is undefined. This is always an error.\nThis can happen for the following reasons:\n• The mod which is required for it is not enabled\n• The author of the game or a mod has made a mistake")
message = S("Error: This node, item or object is undefined. This is always an error.").."\n"..
S("This can happen for the following reasons:").."\n"..
S("• The mod which is required for it is not enabled").."\n"..
S("• The author of the game or a mod has made a mistake")
message = message .. "\n\n"
if mod ~= nil then
if minetest.get_modpath(mod) ~= nil then
message = message .. string.format(S("It appears to originate from the mod “%s”, which is enabled."), mod)
message = message .. S("It appears to originate from the mod “@1”, which is enabled.", mod)
message = message .. "\n"
else
message = message .. string.format(S("It appears to originate from the mod “%s”, which is not enabled!"), mod)
message = message .. S("It appears to originate from the mod “@1”, which is not enabled!", mod)
message = message .. "\n"
end
end
if param ~= nil then
message = message .. string.format(S("Its identifier is “%s”."), param)
message = message .. S("Its identifier is “@1”.", param)
end
elseif itype == "error_ignore" then
message = S("This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.")
@ -55,9 +58,9 @@ doc_identifier.identify = function(itemstack, user, pointed_thing)
minetest.show_formspec(
username,
"doc_identifier:error_missing_item_info",
"size[12,"..vsize..";]" ..
"label[0,0.2;"..minetest.formspec_escape(message).."]" ..
"button_exit[4.5,"..(-0.5+vsize)..";3,1;okay;"..minetest.formspec_escape(S("OK")).."]"
"size[10,"..vsize..";]" ..
"textarea[0.5,0.2;10,"..(vsize-0.2)..";;;"..minetest.formspec_escape(message).."]" ..
"button_exit[3.75,"..(-0.5+vsize)..";3,1;okay;"..minetest.formspec_escape(S("OK")).."]"
)
end
if pointed_thing.type == "node" then

View File

@ -1,8 +1,11 @@
# textdomain:doc_identifier
Error: This node, item or object is undefined. This is always an error.\nThis can happen for the following reasons:\n• The mod which is required for it is not enabled\n• The author of the game or a mod has made a mistake=Fehler: Dieser Node, Gegenstand oder dieses Objekt ist nicht definiert.\nDas ist immer ein Fehler.\nDies kann aus folgenden Gründen passieren:\n• Die Mod, die dafür benötigt wird, ist nicht aktiv\n• Der Spiel-Autor oder ein Mod-Autor machte einen Fehler
It appears to originate from the mod “%s”, which is enabled.=Es scheint von der Mod »%s« zu stammen. Sie ist aktiv.
It appears to originate from the mod “%s”, which is not enabled!=Es scheint von der Mod »%s« zu stammen. Sie ist nicht aktiv!
Its identifier is “%s”.=Der Identifkator ist »%s«.
Error: This node, item or object is undefined. This is always an error.=Fehler: Dieser Node, Gegenstand oder dieses Objekt ist nicht definiert. Das ist immer ein Fehler.
This can happen for the following reasons:=Dies kann aus folgenden Gründen passieren:
• The mod which is required for it is not enabled=• Die Mod, die dafür benötigt wird, ist nicht aktiv
• The author of the game or a mod has made a mistake=• Der Spiel-Autor oder ein Mod-Autor machte einen Fehler
It appears to originate from the mod “@1”, which is enabled.=Es scheint von der Mod „@1“ zu stammen. Sie ist aktiv.
It appears to originate from the mod “@1”, which is not enabled!=Es scheint von der Mod „@1“ zu stammen. Sie ist nicht aktiv!
Its identifier is “@1”.=Der Identifikator ist „@1“.
Lookup Tool=Nachschlagewerkzeug
No help entry for this block could be found.=Für diesen Block konnte kein Hilfseintrag gefunden werden.
No help entry for this item could be found.=Für diesen Gegenstand konnte kein Hilfseintrag gefunden werden.

View File

@ -1,8 +1,11 @@
# textdomain:doc_identifier
Error: This node, item or object is undefined. This is always an error.\\nThis can happen for the following reasons:\\n• The mod which is required for it is not enabled\\n• The author of the game or a mod has made a mistake=
It appears to originate from the mod “%s”, which is enabled.=
It appears to originate from the mod “%s”, which is not enabled!=
Its identifier is “%s”.=
Error: This node, item or object is undefined. This is always an error.=
This can happen for the following reasons:=
• The mod which is required for it is not enabled=
• The author of the game or a mod has made a mistake=
It appears to originate from the mod “@1”, which is enabled.=
It appears to originate from the mod “@1”, which is not enabled!=
Its identifier is “@1”.=
Lookup Tool=
No help entry for this block could be found.=
No help entry for this item could be found.=