mirror of
https://github.com/minetest/minetest.git
synced 2024-09-12 00:26:50 +02:00
Add package title to ContentDB error messages (#12705)
This commit is contained in:
parent
7c5e3cac6a
commit
c4ffe630f1
@ -89,7 +89,7 @@ local function download_and_extract(param)
|
|||||||
if filename == "" or not core.download_file(param.url, filename) then
|
if filename == "" or not core.download_file(param.url, filename) then
|
||||||
core.log("error", "Downloading " .. dump(param.url) .. " failed")
|
core.log("error", "Downloading " .. dump(param.url) .. " failed")
|
||||||
return {
|
return {
|
||||||
msg = fgettext("Failed to download $1", package.name)
|
msg = fgettext("Failed to download \"$1\"", package.title)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ local function download_and_extract(param)
|
|||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
if not tempfolder then
|
if not tempfolder then
|
||||||
return {
|
return {
|
||||||
msg = fgettext("Install: Unsupported file type or broken archive"),
|
msg = fgettext("Failed to extract \"$1\" (unsupported file type or broken archive)", package.title),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ local function start_install(package, reason)
|
|||||||
local path, msg = pkgmgr.install_dir(package.type, result.path, package.name, package.path)
|
local path, msg = pkgmgr.install_dir(package.type, result.path, package.name, package.path)
|
||||||
core.delete_dir(result.path)
|
core.delete_dir(result.path)
|
||||||
if not path then
|
if not path then
|
||||||
gamedata.errormessage = msg
|
gamedata.errormessage = fgettext("Error installing \"$1\": $2", package.title, msg)
|
||||||
else
|
else
|
||||||
core.log("action", "Installed package to " .. path)
|
core.log("action", "Installed package to " .. path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user