From af1943cabc4368ee63cd08df93655263f1f74796 Mon Sep 17 00:00:00 2001 From: crueter Date: Sat, 18 Oct 2025 14:01:15 -0400 Subject: [PATCH] use QT_TR_NOOP Signed-off-by: crueter --- src/qt_common/qt_string_lookup.h | 40 +++++++++++++------------------- src/qt_common/util/content.h | 1 - 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/src/qt_common/qt_string_lookup.h b/src/qt_common/qt_string_lookup.h index 86d7603aad..c8898d0db5 100644 --- a/src/qt_common/qt_string_lookup.h +++ b/src/qt_common/qt_string_lookup.h @@ -12,12 +12,6 @@ namespace QtCommon::StringLookup { Q_NAMESPACE -// fake tr to make linguist happy -constexpr const frozen::string tr(const char *data) -{ - return frozen::string{data}; -} - // TODO(crueter): QML interface enum StringKey { SavesTooltip, @@ -35,37 +29,35 @@ enum StringKey { // Firmware install results FwInstallSuccess, - FwInstallNoOp, FwInstallNoNCAs, FwInstallFailedDelete, FwInstallFailedCopy, FwInstallFailedCorrupted, }; -static const frozen::map strings = { - {SavesTooltip, tr("Contains game save data. DO NOT REMOVE UNLESS YOU KNOW WHAT YOU'RE DOING!")}, - {ShadersTooltip, tr("Contains Vulkan and OpenGL pipeline caches. Generally safe to remove.")}, - {UserNandTooltip, tr("Contains updates and DLC for games.")}, - {SysNandTooltip, tr("Contains firmware and applet data.")}, - {ModsTooltip, tr("Contains game mods, patches, and cheats.")}, +static const frozen::map strings = { + {SavesTooltip, QT_TR_NOOP("Contains game save data. DO NOT REMOVE UNLESS YOU KNOW WHAT YOU'RE DOING!")}, + {ShadersTooltip, QT_TR_NOOP("Contains Vulkan and OpenGL pipeline caches. Generally safe to remove.")}, + {UserNandTooltip, QT_TR_NOOP("Contains updates and DLC for games.")}, + {SysNandTooltip, QT_TR_NOOP("Contains firmware and applet data.")}, + {ModsTooltip, QT_TR_NOOP("Contains game mods, patches, and cheats.")}, // Key install results - {KeyInstallSuccess, tr("Decryption Keys were successfully installed")}, - {KeyInstallInvalidDir, tr("Unable to read key directory, aborting")}, - {KeyInstallErrorFailedCopy, tr("One or more keys failed to copy.")}, - {KeyInstallErrorWrongFilename, tr("Verify your keys file has a .keys extension and try again.")}, + {KeyInstallSuccess, QT_TR_NOOP("Decryption Keys were successfully installed")}, + {KeyInstallInvalidDir, QT_TR_NOOP("Unable to read key directory, aborting")}, + {KeyInstallErrorFailedCopy, QT_TR_NOOP("One or more keys failed to copy.")}, + {KeyInstallErrorWrongFilename, QT_TR_NOOP("Verify your keys file has a .keys extension and try again.")}, {KeyInstallErrorFailedInit, - tr("Decryption Keys failed to initialize. Check that your dumping tools are up to date and " + QT_TR_NOOP("Decryption Keys failed to initialize. Check that your dumping tools are up to date and " "re-dump keys.")}, // fw install - {FwInstallSuccess, tr("Successfully installed firmware version %1")}, - {FwInstallNoOp, tr("")}, - {FwInstallNoNCAs, tr("Unable to locate potential firmware NCA files")}, - {FwInstallFailedDelete, tr("Failed to delete one or more firmware files.")}, - {FwInstallFailedCopy, tr("One or more firmware files failed to copy into NAND.")}, + {FwInstallSuccess, QT_TR_NOOP("Successfully installed firmware version %1")}, + {FwInstallNoNCAs, QT_TR_NOOP("Unable to locate potential firmware NCA files")}, + {FwInstallFailedDelete, QT_TR_NOOP("Failed to delete one or more firmware files.")}, + {FwInstallFailedCopy, QT_TR_NOOP("One or more firmware files failed to copy into NAND.")}, {FwInstallFailedCorrupted, - tr("Firmware installation cancelled, firmware may be in a bad state or corrupted. Restart " + QT_TR_NOOP("Firmware installation cancelled, firmware may be in a bad state or corrupted. Restart " "Eden or re-install firmware.")}, }; diff --git a/src/qt_common/util/content.h b/src/qt_common/util/content.h index bbb014e9cb..d1384546e1 100644 --- a/src/qt_common/util/content.h +++ b/src/qt_common/util/content.h @@ -17,7 +17,6 @@ bool CheckGameFirmware(u64 program_id, QObject *parent); enum class FirmwareInstallResult { Success, - NoOp, NoNCAs, FailedDelete, FailedCopy,