mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-20 14:39:18 +02:00
[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 <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
parent
1575f55abe
commit
505b157647
1 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ namespace ConfigurationShared {
|
||||||
|
|
||||||
std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
||||||
std::unique_ptr<TranslationMap> translations = std::make_unique<TranslationMap>();
|
std::unique_ptr<TranslationMap> translations = std::make_unique<TranslationMap>();
|
||||||
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) \
|
#define INSERT(SETTINGS, ID, NAME, TOOLTIP) \
|
||||||
translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{(NAME), (TOOLTIP)}})
|
translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{(NAME), (TOOLTIP)}})
|
||||||
|
|
@ -368,8 +368,8 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
||||||
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent) {
|
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent) {
|
||||||
std::unique_ptr<ComboboxTranslationMap> translations =
|
std::unique_ptr<ComboboxTranslationMap> translations =
|
||||||
std::make_unique<ComboboxTranslationMap>();
|
std::make_unique<ComboboxTranslationMap>();
|
||||||
const auto& tr = [&](const char* text, const char* context = "") {
|
const auto& tr = [](const char* text, const char* context = "") {
|
||||||
return parent->tr(text, context);
|
return QCoreApplication::translate("ConfigurationShared", text, context);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PAIR(ENUM, VALUE, TRANSLATION) {static_cast<u32>(Settings::ENUM::VALUE), (TRANSLATION)}
|
#define PAIR(ENUM, VALUE, TRANSLATION) {static_cast<u32>(Settings::ENUM::VALUE), (TRANSLATION)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue