From e616e595ae5c1af89a336e4e337a41b9855eaf6e Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 16 Nov 2025 14:51:14 +0000 Subject: i18n: init localization for ANR, Permissions and Notifications (#12316) Adds localization support for en, it, pl and jp --------- Co-authored-by: Mihai Fufezan Co-authored-by: Aaron Blasko --- src/plugins/PluginSystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/PluginSystem.cpp') diff --git a/src/plugins/PluginSystem.cpp b/src/plugins/PluginSystem.cpp index 740b2cce..27e8232e 100644 --- a/src/plugins/PluginSystem.cpp +++ b/src/plugins/PluginSystem.cpp @@ -9,6 +9,7 @@ #include "../managers/eventLoop/EventLoopManager.hpp" #include "../managers/permissions/DynamicPermissionManager.hpp" #include "../debug/HyprNotificationOverlay.hpp" +#include "../i18n/Engine.hpp" CPluginSystem::CPluginSystem() { g_pFunctionHookSystem = makeUnique(); @@ -224,7 +225,8 @@ void CPluginSystem::updateConfigPlugins(const std::vector& plugins, if (result->hasError()) { const auto NAME = path.contains('/') ? path.substr(path.find_last_of('/') + 1) : path; Debug::log(ERR, "CPluginSystem::updateConfigPlugins: failed to load plugin {}: {}", NAME, result->error()); - g_pHyprNotificationOverlay->addNotification(std::format("Failed to load plugin {}: {}", NAME, result->error()), CHyprColor{0, 0, 0, 0}, 5000, ICON_ERROR); + g_pHyprNotificationOverlay->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_FAILED_TO_LOAD_PLUGIN, {{"name", NAME}, {"error", result->error()}}), + CHyprColor{0, 0, 0, 0}, 5000, ICON_ERROR); return; } -- cgit v1.2.3