diff options
| author | crueter <crueter@eden-emu.dev> | 2025-10-18 22:19:06 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-18 22:19:06 +0200 |
| commit | a53823646c6b7043579918fc7dd732ca82336acf (patch) | |
| tree | c3c185cd72599402485a46def11e9138fd3eb0ed /src/frontend_common | |
| parent | b330117a14820284a3fbc433e77369d90a910012 (diff) | |
[qt] fix translations (#2773)
Linguist strongly dislikes lookup tables of this sort due to the fact
that it looks for tr(), qsTr(), etc. when determining what strings need
translations. However, it does provide QT_TR_NOOP which marks the
string for translation *without* running the translation, which is designed
to allow for static or constexpr lookup tables. So let's use that.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2773
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/frontend_common')
| -rw-r--r-- | src/frontend_common/firmware_manager.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/frontend_common/firmware_manager.h b/src/frontend_common/firmware_manager.h index 23fce59eb3..40814a11f8 100644 --- a/src/frontend_common/firmware_manager.h +++ b/src/frontend_common/firmware_manager.h @@ -15,21 +15,12 @@ #include <core/hle/service/am/frontend/applet_mii_edit.h> #include <string> +#include "core/hle/result.h" #include "core/hle/service/set/settings_types.h" #include "core/hle/service/set/system_settings_server.h" -#include "core/hle/result.h" namespace FirmwareManager { -static constexpr std::array<const char *, 5> KEY_INSTALL_RESULT_STRINGS = { - "Decryption Keys were successfully installed", - "Unable to read key directory, aborting", - "One or more keys failed to copy.", - "Verify your keys file has a .keys extension and try again.", - "Decryption Keys failed to initialize. Check that your dumping tools are up to date and " - "re-dump keys.", -}; - static constexpr std::array<u64, 1> FIRMWARE_REQUIRED_GAMES = { 0x0100152000022000ULL, // MK8DX }; @@ -51,16 +42,6 @@ enum KeyInstallResult { KeyInstallResult InstallKeys(std::string location, std::string expected_extension); /** - * \brief Get a string representation of a result from InstallKeys. - * \param result The result code. - * \return A string representation of the passed result code. - */ -inline constexpr const char *GetKeyInstallResultString(KeyInstallResult result) -{ - return KEY_INSTALL_RESULT_STRINGS.at(static_cast<std::size_t>(result)); -} - -/** * \brief Check if the specified program requires firmware to run properly. * It is the responsibility of the frontend to properly expose this to the user. * \param program_id The program ID to check. |
