diff --git a/lib/modAssist_func_lib.js b/lib/modAssist_func_lib.js index edae6dff..d18d64fe 100644 --- a/lib/modAssist_func_lib.js +++ b/lib/modAssist_func_lib.js @@ -1636,6 +1636,7 @@ const saveManage = { if ( results.errorList.length === 0 ) { serveIPC.windowLib.sendToValidWindow('save_manage', 'fromMain_saveImport', result.filePaths[0]) } else { + serveIPC.windowLib.doDialogBox('save_manage', { type : 'warning', titleL10n : 'load_save_import_title', messageL10n : 'load_save_import_failed' }) saveManage.log.danger('Invalid Save File') } }) diff --git a/renderer/renderJS/savemanage_ui.js b/renderer/renderJS/savemanage_ui.js index 0e656a76..97ac478f 100644 --- a/renderer/renderJS/savemanage_ui.js +++ b/renderer/renderJS/savemanage_ui.js @@ -11,6 +11,7 @@ let uuidMap = {} window.mods.receive('fromMain_saveImport', (savePath) => { + console.log(savePath) fsgUtil.setContent({ save_import_path : savePath, }) @@ -20,8 +21,8 @@ window.mods.receive('fromMain_saveInfo', (modCollect) => { uuidMap = {} const theseSaves = modCollect.opts.saveInfo - const activeIDS = Object.keys(theseSaves).filter((x) => theseSaves[x].active !== false && theseSaves[x].active.error === false) - const backIDS = Object.keys(theseSaves).filter((x) => theseSaves[x].backups.length !== 0 ) + const activeIDS = Object.keys(theseSaves).filter((x) => typeof theseSaves[x].active === 'object' && theseSaves[x].active?.error === false) + const backIDS = Object.keys(theseSaves).filter((x) => Array.isArray(theseSaves[x].backups) && theseSaves[x].backups.length !== 0 ) const activeGameHTML = [] const backGameHTML = [] diff --git a/translations/cs.json b/translations/cs.json index 93472693..3ab67ede 100644 --- a/translations/cs.json +++ b/translations/cs.json @@ -210,6 +210,8 @@ "list-active__title" : "请在 gameSettings.xml 文件中将此收藏夹设置为激活状态", "list-none" : "取消激活", "list-none__title" : "请在 gameSettings.xml 文件中取消激活覆盖。", + "load_save_import_failed" : "无法读取指定的保存文件,无法继续导入。", + "load_save_import_title" : "无效保存文件", "loading_cache_subtitle" : "清理额外的缓存条目 (较慢)", "loading_cache_title" : "清除缓存", "loading_download_subtitle" : "Please wait, this could take a minute", diff --git a/translations/cz.json b/translations/cz.json index 5a8491c7..13d0b5e1 100644 --- a/translations/cz.json +++ b/translations/cz.json @@ -210,6 +210,8 @@ "list-active__title" : "Nastavte tuto kolekci Aktivní v herním Settings.xml", "list-none" : "Deaktivovat", "list-none__title" : "Deaktivovat přepsání v herním Settings.xml", + "load_save_import_failed" : "Nelze přečíst zadaný uložený soubor, nelze pokračovat v importu.", + "load_save_import_title" : "Neplatný soubor pro uložení", "loading_cache_subtitle" : "Čištění extra položek mezipaměti (pomalé!)", "loading_cache_title" : "Vyčistit mezipaměť", "loading_download_subtitle" : "Počkejte prosím, může to chvíli trvat", diff --git a/translations/de.json b/translations/de.json index 53cc3838..d26c854f 100644 --- a/translations/de.json +++ b/translations/de.json @@ -210,6 +210,8 @@ "list-active__title" : "Diese Sammlung in gameSettings.xml auf Aktiv setzen", "list-none" : "Deaktivieren", "list-none__title" : "Deaktivieren der Überschreibung in gameSettings.xml", + "load_save_import_failed" : "Die angegebene Speicherdatei kann nicht gelesen werden, der Import kann nicht fortgesetzt werden.", + "load_save_import_title" : "Ungültige Speicherdatei", "loading_cache_subtitle" : "Bereinigung zusätzlicher Cache-Einträge (langsam!)", "loading_cache_title" : "Cache reinigen", "loading_download_subtitle" : "Bitte warten. Dies kann einige Minuten dauern", diff --git a/translations/en.json b/translations/en.json index 1e36f659..4bb99662 100644 --- a/translations/en.json +++ b/translations/en.json @@ -210,6 +210,8 @@ "list-active__title" : "Set this Collection Active in gameSettings.xml", "list-none" : "Deactivate", "list-none__title" : "Deactivate override in gameSettings.xml", + "load_save_import_failed" : "Unable to read specified save file, unable to continue import.", + "load_save_import_title" : "Invalid Save File", "loading_cache_subtitle" : "Cleaning extra cache entries (slow!)", "loading_cache_title" : "Cleaning Cache", "loading_download_subtitle" : "Please wait, this could take a minute", diff --git a/translations/es.json b/translations/es.json index b846191f..c7b614d7 100644 --- a/translations/es.json +++ b/translations/es.json @@ -210,6 +210,8 @@ "list-active__title" : "Establece esta colección como activa en gameSettings.xml", "list-none" : "Desactivar", "list-none__title" : "Desactivar la anulación en gameSettings.xml", + "load_save_import_failed" : "No se ha podido leer el archivo guardado especificado, no se puede continuar con la importación.", + "load_save_import_title" : "Archivo de almacenamiento no válido", "loading_cache_subtitle" : "Limpieza de entradas de caché adicionales (¡lento!)", "loading_cache_title" : "Limpieza de la caché", "loading_download_subtitle" : "Por favor, espere, esto puede tardar un minuto", diff --git a/translations/fr.json b/translations/fr.json index e73efb3b..3506f85e 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -210,6 +210,8 @@ "list-active__title" : "Définissez cette collection active dans gameSettings.xml.", "list-none" : "Désactiver", "list-none__title" : "Désactiver la surcharge dans gameSettings.xml", + "load_save_import_failed" : "Impossible de lire le fichier d'enregistrement spécifié, impossible de poursuivre l'importation.", + "load_save_import_title" : "Fichier d'enregistrement invalide", "loading_cache_subtitle" : "Nettoyage des entrées supplémentaires dans le cache (lent !)", "loading_cache_title" : "Nettoyage du cache", "loading_download_subtitle" : "Veuillez patienter. Cette action peut prendre quelques minutes", diff --git a/translations/lv.json b/translations/lv.json index 498fb721..f98ff8ea 100644 --- a/translations/lv.json +++ b/translations/lv.json @@ -210,6 +210,8 @@ "list-active__title" : "Iestatiet šo kolekciju Active in gameSettings.xml", "list-none" : "Deaktivizēt", "list-none__title" : "Deaktivizēt override in gameSettings.xml", + "load_save_import_failed" : "Nevar nolasīt norādīto saglabāšanas failu, nevar turpināt importēšanu.", + "load_save_import_title" : "Nederīgs saglabāšanas fails", "loading_cache_subtitle" : "Papildu kešatmiņas ierakstu tīrīšana (lēni!)", "loading_cache_title" : "Cache tīrīšana", "loading_download_subtitle" : "Lūdzu, pagaidiet, tas var aizņemt minūti", diff --git a/translations/nl.json b/translations/nl.json index b29a9b86..b351f25a 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -210,6 +210,8 @@ "list-active__title" : "Stel deze collectie actief in gameSettings.xml", "list-none" : "Deactiveer", "list-none__title" : "Deactiveer override in gameSettings.xml", + "load_save_import_failed" : "Kan opgegeven opslagbestand niet lezen, kan import niet voortzetten.", + "load_save_import_title" : "Ongeldig bestand opslaan", "loading_cache_subtitle" : "Opschonen van extra cache entries (traag!)", "loading_cache_title" : "Cache schoonmaken", "loading_download_subtitle" : "Geduld a.u.b., dit kan enkele minuten duren", diff --git a/translations/pl.json b/translations/pl.json index 79fdabce..50adbb45 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -210,6 +210,8 @@ "list-active__title" : "Ustaw ten folder jako aktywny w gameSettings.xml", "list-none" : "Dezaktywuj", "list-none__title" : "Dezaktywuj nadpisywanie w gameSettings.xml", + "load_save_import_failed" : "Nie można odczytać określonego pliku zapisu, nie można kontynuować importu.", + "load_save_import_title" : "Nieprawidłowy plik zapisu", "loading_cache_subtitle" : "Czyszczenie dodatkowych wpisów w pamięci podręcznej (wolno!)", "loading_cache_title" : "Czyszczenie pamięci podręcznej", "loading_download_subtitle" : "Proszę czekać, to może potrwać minutę", diff --git a/translations/pt.json b/translations/pt.json index 9e6ff5a3..aec7a0d7 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -210,6 +210,8 @@ "list-active__title" : "Definir esta coleção como ativa em gameSettings.xml", "list-none" : "Desativar", "list-none__title" : "Desativar substituição em gameSettings.xml", + "load_save_import_failed" : "Não foi possível ler o ficheiro guardado especificado, não é possível continuar a importação.", + "load_save_import_title" : "Ficheiro de gravação inválido", "loading_cache_subtitle" : "Limpando entradas de cache adicionais (lento!)", "loading_cache_title" : "limpeza de cache", "loading_download_subtitle" : "Aguarde, isso pode levar um minuto.", diff --git a/translations/ru.json b/translations/ru.json index b240c473..219394a1 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -210,6 +210,8 @@ "list-active__title" : "Активировать эту коллекцию в файле gameSettings.xml.", "list-none" : "Деактивировать", "list-none__title" : "Деактивировать переопределение в gameSettings.xml", + "load_save_import_failed" : "Невозможно прочитать указанный файл сохранения, невозможно продолжить импорт.", + "load_save_import_title" : "Недопустимый файл сохранения", "loading_cache_subtitle" : "Очистка лишних записей в кеше (медленно!)", "loading_cache_title" : "Очистка кеша", "loading_download_subtitle" : "Пожалуйста, подождите, это может занять минуту",