[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>
This commit is contained in:
crueter 2025-10-18 22:19:06 +02:00
parent b330117a14
commit a53823646c
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
11 changed files with 234 additions and 193 deletions

View file

@ -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
};
@ -50,16 +41,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.