Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package title to ContentDB error messages #12705

Merged
merged 1 commit into from
Aug 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add game title and author to ContentDB error messages
Fixes #12671
  • Loading branch information
rubenwardy committed Aug 15, 2022
commit abc9e40df5fdfb662a133c679eaf9a58d23f3385
6 changes: 3 additions & 3 deletions builtin/mainmenu/dlg_contentstore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ local function download_and_extract(param)
if filename == "" or not core.download_file(param.url, filename) then
core.log("error", "Downloading " .. dump(param.url) .. " failed")
return {
msg = fgettext("Failed to download $1", package.name)
msg = fgettext("Failed to download \"$1\"", package.title)
}
end

Expand All @@ -105,7 +105,7 @@ local function download_and_extract(param)
os.remove(filename)
if not tempfolder then
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

Expand All @@ -129,7 +129,7 @@ local function start_install(package, reason)
local path, msg = pkgmgr.install_dir(package.type, result.path, package.name, package.path)
core.delete_dir(result.path)
if not path then
gamedata.errormessage = msg
gamedata.errormessage = fgettext("Error installing \"$1\": $2", package.title, msg)
else
core.log("action", "Installed package to " .. path)

Expand Down