From 2caaa9a9085a638bcf812b0f117735f0d104b363 Mon Sep 17 00:00:00 2001 From: Delta <46466697+DeltaGW2@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:36:02 +0200 Subject: [PATCH] update localisation + fix loader internal crash --- src/GUI/Widgets/Addons/AddonItem.cpp | 20 ++++++++++++++++++++ src/Loader/Loader.cpp | 5 +---- src/Resources/Locales | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/GUI/Widgets/Addons/AddonItem.cpp b/src/GUI/Widgets/Addons/AddonItem.cpp index 57850e9..91363a4 100644 --- a/src/GUI/Widgets/Addons/AddonItem.cpp +++ b/src/GUI/Widgets/Addons/AddonItem.cpp @@ -137,6 +137,26 @@ namespace GUI aAddon->Definitions->UpdateLink != nullptr ? aAddon->Definitions->UpdateLink : "")) { Loader::QueueAddon(ELoaderAction::Reload, tmpPath); + + std::string notification = aAddon->Definitions->Name; + if (aAddon->State == EAddonState::LoadedLOCKED) + { + notification.append(Language.Translate("((000079))")); + } + else + { + notification.append(" "); + notification.append(Language.Translate("((000081))")); + } + + GUI::Alerts::Notify(notification.c_str()); + } + else + { + std::string notification = aAddon->Definitions->Name; + notification.append(" "); + notification.append(Language.Translate("((000082))")); + GUI::Alerts::Notify(notification.c_str()); } Sleep(1000); // arbitrary sleep otherwise the user never even sees "is checking..." aAddon->IsCheckingForUpdates = false; diff --git a/src/Loader/Loader.cpp b/src/Loader/Loader.cpp index 28ef83c..0dca0aa 100644 --- a/src/Loader/Loader.cpp +++ b/src/Loader/Loader.cpp @@ -510,11 +510,9 @@ namespace Loader catch (std::filesystem::filesystem_error fErr) { LogDebug(CH_LOADER, "%s", fErr.what()); - return; } } - - if (path.extension() == extOld) + else if (path.extension() == extOld) { try { @@ -523,7 +521,6 @@ namespace Loader catch (std::filesystem::filesystem_error fErr) { LogDebug(CH_LOADER, "%s", fErr.what()); - return; } } } diff --git a/src/Resources/Locales b/src/Resources/Locales index a049529..a14274a 160000 --- a/src/Resources/Locales +++ b/src/Resources/Locales @@ -1 +1 @@ -Subproject commit a049529e34f597be513c233ae0931d1e68d08989 +Subproject commit a14274ade7292785ad48b9af86b7df335f175d36