diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-11-16 14:51:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-16 14:51:14 +0000 |
| commit | e616e595ae5c1af89a336e4e337a41b9855eaf6e (patch) | |
| tree | 328dd136e65963d1e47864af3feafcc304fc280d /src/plugins/PluginSystem.cpp | |
| parent | cb47eb1d11bbac1ebab8f9cd7a5f96a475eaab28 (diff) | |
i18n: init localization for ANR, Permissions and Notifications (#12316)
Adds localization support for en, it, pl and jp
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Aaron Blasko <blaskoazzolaaaron@gmail.com>
Diffstat (limited to 'src/plugins/PluginSystem.cpp')
| -rw-r--r-- | src/plugins/PluginSystem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<CHookSystem>(); @@ -224,7 +225,8 @@ void CPluginSystem::updateConfigPlugins(const std::vector<std::string>& 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; } |
