System: Display localized trait names

This commit is contained in:
Stenzek 2024-10-19 01:16:05 +10:00
parent 57cf0f2643
commit 76208f5f2d
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -663,7 +663,7 @@ bool System::IsPALRegion()
return s_region == ConsoleRegion::PAL;
}
const char* System::GetTaintDisplayName(Taint taint)
std::string_view System::GetTaintDisplayName(Taint taint)
{
static constexpr const std::array<const char*, static_cast<size_t>(Taint::MaxCount)> names = {{
TRANSLATE_DISAMBIG_NOOP("System", "CPU Overclock", "Taint"),
@ -675,7 +675,7 @@ const char* System::GetTaintDisplayName(Taint taint)
TRANSLATE_DISAMBIG_NOOP("System", "Game Patches", "Taint"),
}};
return names[static_cast<size_t>(taint)];
return Host::TranslateToStringView("System", names[static_cast<size_t>(taint)], "Taint");
}
const char* System::GetTaintName(Taint taint)

View File

@ -169,7 +169,7 @@ DiscRegion GetDiscRegion();
bool IsPALRegion();
/// Taints - flags that are set on the system and only cleared on reset.
const char* GetTaintDisplayName(Taint taint);
std::string_view GetTaintDisplayName(Taint taint);
const char* GetTaintName(Taint taint);
bool HasTaint(Taint taint);
void SetTaint(Taint taint);