diff --git a/UI/DiscordIntegration.cpp b/UI/DiscordIntegration.cpp index c57a9a6df9..cc5b21b0cb 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -5,7 +5,7 @@ #include "Common/Log.h" #include "Core/Config.h" #include "DiscordIntegration.h" - +#include "i18n/i18n.h" #ifdef _WIN32 @@ -13,10 +13,10 @@ #else +// TODO + #endif - - #ifdef ENABLE_DISCORD #include "ext/discord-rpc/include/discord_rpc.h" #endif @@ -90,9 +90,12 @@ void Discord::SetPresenceGame(const char *gameTitle) { } #ifdef ENABLE_DISCORD + I18NCategory *sc = GetI18NCategory("Screen"); + DiscordRichPresence discordPresence{}; discordPresence.state = gameTitle; - discordPresence.details = "Playing"; + std::string details = sc->T("Playing"); + discordPresence.details = details.c_str(); discordPresence.startTimestamp = time(0); #ifdef GOLD discordPresence.largeImageKey = "icon_gold_png"; @@ -112,8 +115,10 @@ void Discord::SetPresenceMenu() { } #ifdef ENABLE_DISCORD + I18NCategory *sc = GetI18NCategory("Screen"); + DiscordRichPresence discordPresence{}; - discordPresence.state = "In menu"; + discordPresence.state = sc->T("In menu"); discordPresence.details = ""; discordPresence.startTimestamp = time(0); #ifdef GOLD diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 391216dd73..e34a8e10c7 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -187,6 +187,8 @@ void EmuScreen::bootGame(const std::string &filename) { if (!bootAllowStorage(filename)) return; + I18NCategory *sc = GetI18NCategory("Screen"); + //pre-emptive loading of game specific config if possible, to get all the settings std::shared_ptr info = g_gameInfoCache->GetInfo(nullptr, filename, 0); if (info && !info->id.empty()) { @@ -196,7 +198,7 @@ void EmuScreen::bootGame(const std::string &filename) { g_Discord.SetPresenceGame(info->GetTitle().c_str()); } else { - g_Discord.SetPresenceGame("(unknown)"); + g_Discord.SetPresenceGame(sc->T("Untitled PSP game")); } invalid_ = true;