Skip to content

Commit

Permalink
update localisation + fix loader internal crash
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaGW2 committed Apr 27, 2024
1 parent f929623 commit 2caaa9a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
20 changes: 20 additions & 0 deletions src/GUI/Widgets/Addons/AddonItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions src/Loader/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -523,7 +521,6 @@ namespace Loader
catch (std::filesystem::filesystem_error fErr)
{
LogDebug(CH_LOADER, "%s", fErr.what());
return;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Locales
Submodule Locales updated 1 files
+4 −1 en_Main.json

0 comments on commit 2caaa9a

Please sign in to comment.