From 505b1576470796db7e6d561f62ac392f613b9797 Mon Sep 17 00:00:00 2001 From: PavelBARABANOV Date: Tue, 15 Sep 2026 03:42:11 +0200 Subject: [PATCH] [qt common] use ConfigurationShared translation context (#4430) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4430 Reviewed-by: crueter Reviewed-by: CamilleLaVey --- src/qt_common/config/shared_translation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt_common/config/shared_translation.cpp b/src/qt_common/config/shared_translation.cpp index be2f986eaf..0db439691f 100644 --- a/src/qt_common/config/shared_translation.cpp +++ b/src/qt_common/config/shared_translation.cpp @@ -23,7 +23,7 @@ namespace ConfigurationShared { std::unique_ptr InitializeTranslations(QObject* parent) { std::unique_ptr translations = std::make_unique(); - const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); }; + const auto& tr = [](const char* text) -> QString { return QCoreApplication::translate("ConfigurationShared", text); }; #define INSERT(SETTINGS, ID, NAME, TOOLTIP) \ translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{(NAME), (TOOLTIP)}}) @@ -368,8 +368,8 @@ std::unique_ptr InitializeTranslations(QObject* parent) { std::unique_ptr ComboboxEnumeration(QObject* parent) { std::unique_ptr translations = std::make_unique(); - const auto& tr = [&](const char* text, const char* context = "") { - return parent->tr(text, context); + const auto& tr = [](const char* text, const char* context = "") { + return QCoreApplication::translate("ConfigurationShared", text, context); }; #define PAIR(ENUM, VALUE, TRANSLATION) {static_cast(Settings::ENUM::VALUE), (TRANSLATION)}