From e5c371cf88abaefad72e09b146cad07e69e64b88 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 6 Oct 2020 04:37:43 +0300 Subject: [PATCH] Added error code to pxo open/save error messages --- Translations/Translations.pot | 4 ++-- src/Autoload/OpenSave.gd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Translations/Translations.pot b/Translations/Translations.pot index b1112bd82..097f36e6e 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -1203,10 +1203,10 @@ msgstr "" msgid "File autosaved" msgstr "" -msgid "File failed to open" +msgid "File failed to open. Error code %s" msgstr "" -msgid "File failed to save" +msgid "File failed to save. Error code %s" msgstr "" msgid "File exported" diff --git a/src/Autoload/OpenSave.gd b/src/Autoload/OpenSave.gd index f784c554e..d2e23054d 100644 --- a/src/Autoload/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -53,7 +53,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void: err = file.open(path, File.READ) # If the file is not compressed open it raw (pre-v0.7) if err != OK: - Global.notification_label("File failed to open") + Global.notification_label(tr("File failed to open. Error code %s") % err) file.close() return @@ -317,7 +317,7 @@ func save_pxo_file(path : String, autosave : bool, use_zstd_compression := true, Global.file_menu.get_popup().set_item_text(3, tr("Save") + " %s" % path.get_file()) else: - Global.notification_label("File failed to save") + Global.notification_label(tr("File failed to save. Error code %s") % err) file.close()