From 033042fdfb9aa5ff54746c3ed5159a1b69c1c43e Mon Sep 17 00:00:00 2001 From: Eric Trenkel Date: Sun, 13 Aug 2023 11:59:55 +0200 Subject: [PATCH] Fixed cleanup path and cleanup text (#207) * Changed "Quick actions" to "snippets" * Changed Community Actions to Snippets * Version bump * Version bump * Changed snippet to code snippet * Upgraded dependencies * Fixed windows recreating distro folders * Fixed cleanup path * Fixed cleanup text --- lib/api/wsl.dart | 6 +++--- lib/i18n/en.json | 2 +- lib/i18n/pt.json | 2 +- lib/i18n/zh_tw.json | 2 +- lib/nav/init.dart | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/api/wsl.dart b/lib/api/wsl.dart index 26252e1..c0ba528 100644 --- a/lib/api/wsl.dart +++ b/lib/api/wsl.dart @@ -548,14 +548,14 @@ class WSLApi { /// Clean up WSL distros. Exporting, deleting, and importing. Future cleanup(String distribution) async { - var file = getInstancePath(distribution).file('export.tar.gz'); + var instancePath = getInstancePath(distribution); + var file = instancePath.file('export.tar.gz'); // Export, remove, and import await export(distribution, file); await remove(distribution); - var res = await import(distribution, '', file); - return res; + return await import(distribution, instancePath.path, file); } /// Returns list of WSL distros diff --git a/lib/i18n/en.json b/lib/i18n/en.json index 805e3f5..1d14588 100644 --- a/lib/i18n/en.json +++ b/lib/i18n/en.json @@ -147,7 +147,7 @@ "language-text": "Language", "languagechange-text": "Language change will take effect after restart.", "notemplates-text": "No templates found", - "cleanuptitle-text": "Clean up WSL instance ($s0)", + "cleanuptitle-text": "Clean up WSL instance (%s0)", "cleanupbody-text": "Do you really want to clean up the distribution? This will export and re-import the distribution. This may take some time.", "continue-text": "Continue", "cleanup-text": "Cleanup", diff --git a/lib/i18n/pt.json b/lib/i18n/pt.json index 6632507..f07794c 100644 --- a/lib/i18n/pt.json +++ b/lib/i18n/pt.json @@ -148,7 +148,7 @@ "language-text": "Idioma", "languagechange-text": "A alteração de idioma terá efeito após o reinício.", "notemplates-text": "Nenhum modelo encontrado", - "cleanuptitle-text": "Limpar instância WSL ($s0)", + "cleanuptitle-text": "Limpar instância WSL (%s0)", "cleanupbody-text": "Você realmente quer limpar a distribuição? Isso exportará e importará a distribuição novamente. Isso pode levar algum tempo.", "continue-text": "Continuar", "cleanuptext-text": "Limpar", diff --git a/lib/i18n/zh_tw.json b/lib/i18n/zh_tw.json index 866f5c2..c919c1c 100644 --- a/lib/i18n/zh_tw.json +++ b/lib/i18n/zh_tw.json @@ -148,7 +148,7 @@ "language-text": "語言", "languagechange-text": "語言變更將在重新啟動後生效。", "notemplates-text": "沒有找到範本", - "cleanuptitle-text": "清理 WSL 安裝實體 ($s0)", + "cleanuptitle-text": "清理 WSL 安裝實體 (%s0)", "cleanupbody-text": "您確定要清理發行版本嗎?這將匯出並重新匯入發行版本。這可能需要一些時間。", "continue-text": "繼續", "cleanup-text": "清理", diff --git a/lib/nav/init.dart b/lib/nav/init.dart index b6c2937..671278f 100644 --- a/lib/nav/init.dart +++ b/lib/nav/init.dart @@ -43,9 +43,9 @@ initRoot(statusMsg) async { // if (kDebugMode) { // prefs.remove('version'); // } - if (kDebugMode) { - prefs.setString('version', '1.8.0'); - } + // if (kDebugMode) { + // prefs.setString('version', '1.8.0'); + // } // Check updates App app = App();