From 1c7b1d7ff9c61fcfc57fa614f33df6e62df15b03 Mon Sep 17 00:00:00 2001 From: KamFretoZ <14798312+kamfretoz@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:48:04 +0700 Subject: [PATCH] Translation: Make game type string translatable Addresses `Game Properties -> Details -> Type -> Type names are untranslatable.` --- pcsx2/GameList.cpp | 4 ++-- pcsx2/ImGui/FullscreenUI.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/GameList.cpp b/pcsx2/GameList.cpp index 51e7447042..780f963e24 100644 --- a/pcsx2/GameList.cpp +++ b/pcsx2/GameList.cpp @@ -99,14 +99,14 @@ const char* GameList::EntryTypeToString(EntryType type) const char* GameList::EntryTypeToDisplayString(EntryType type) { - static std::array(EntryType::Count)> names = {{"PS2 Disc", "PS1 Disc", "ELF"}}; + static std::array(EntryType::Count)> names = {{TRANSLATE("GameList", "PS2 Disc"), TRANSLATE("GameList", "PS1 Disc"), TRANSLATE("GameList", "ELF")}}; return names[static_cast(type)]; } const char* GameList::RegionToString(Region region) { static std::array(Region::Count)> names = {{"NTSC-B", "NTSC-C", "NTSC-HK", "NTSC-J", "NTSC-K", "NTSC-T", - "NTSC-U", "Other", "PAL-A", "PAL-AF", "PAL-AU", "PAL-BE", "PAL-E", "PAL-F", "PAL-FI", "PAL-G", "PAL-GR", "PAL-I", "PAL-IN", "PAL-M", + "NTSC-U", TRANSLATE("GameList", "Other"), "PAL-A", "PAL-AF", "PAL-AU", "PAL-BE", "PAL-E", "PAL-F", "PAL-FI", "PAL-G", "PAL-GR", "PAL-I", "PAL-IN", "PAL-M", "PAL-NL", "PAL-NO", "PAL-P", "PAL-PL", "PAL-R", "PAL-S", "PAL-SC", "PAL-SW", "PAL-SWI", "PAL-UK"}}; return names[static_cast(region)]; diff --git a/pcsx2/ImGui/FullscreenUI.cpp b/pcsx2/ImGui/FullscreenUI.cpp index 03828e50d4..bf4d78c3bf 100644 --- a/pcsx2/ImGui/FullscreenUI.cpp +++ b/pcsx2/ImGui/FullscreenUI.cpp @@ -3003,8 +3003,8 @@ void FullscreenUI::DrawSummarySettingsPage() CopyTextToClipboard(FSUI_STR("Game serial copied to clipboard."), s_game_settings_entry->serial); if (MenuButton(FSUI_ICONSTR(ICON_FA_CODE, "CRC"), fmt::format("{:08X}", s_game_settings_entry->crc).c_str(), true)) CopyTextToClipboard(FSUI_STR("Game CRC copied to clipboard."), fmt::format("{:08X}", s_game_settings_entry->crc)); - if (MenuButton(FSUI_ICONSTR(ICON_FA_BOX, "Type"), GameList::EntryTypeToString(s_game_settings_entry->type), true)) - CopyTextToClipboard(FSUI_STR("Game type copied to clipboard."), GameList::EntryTypeToString(s_game_settings_entry->type)); + if (MenuButton(FSUI_ICONSTR(ICON_FA_BOX, "Type"), GameList::EntryTypeToDisplayString(s_game_settings_entry->type), true)) + CopyTextToClipboard(FSUI_STR("Game type copied to clipboard."), GameList::EntryTypeToDisplayString(s_game_settings_entry->type)); if (MenuButton(FSUI_ICONSTR(ICON_FA_GLOBE, "Region"), GameList::RegionToString(s_game_settings_entry->region), true)) CopyTextToClipboard(FSUI_STR("Game region copied to clipboard."), GameList::RegionToString(s_game_settings_entry->region)); if (MenuButton(FSUI_ICONSTR(ICON_FA_STAR, "Compatibility Rating"),