From 50eae3b9448ee3974debc2dca46a880932f80bd6 Mon Sep 17 00:00:00 2001 From: Phil B Date: Sat, 6 May 2023 19:25:56 +0200 Subject: [PATCH] added translation for "nobody has played here today!" in the stats command --- lang.json | 19 +++++++++++++++++++ modules/trivia/trivia.cpp | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lang.json b/lang.json index e193439..babd769 100644 --- a/lang.json +++ b/lang.json @@ -1386,6 +1386,25 @@ "zh": "今日十大", "nl": "De top tien van vandaag" }, + "NOBODY_PLAYED_TODAY": { + "en": "Nobody has played here today! :cry:", + "tr": "Nobody has played here today! :cry:", + "pt": "Nobody has played here today! :cry:", + "fr": "Nobody has played here today! :cry:", + "es": "Nobody has played here today! :cry:", + "de": "Heute hat hier noch keiner gespielt! :cry:", + "hi": "Nobody has played here today! :cry:", + "sv": "Nobody has played here today! :cry:", + "ru": "Nobody has played here today! :cry:", + "it": "Nobody has played here today! :cry:", + "pl": "Nobody has played here today! :cry:", + "ko": "Nobody has played here today! :cry:", + "ja": "Nobody has played here today! :cry:", + "bg": "Nobody has played here today! :cry:", + "ar": "Nobody has played here today! :cry:", + "zh": "Nobody has played here today! :cry:", + "nl": "Nobody has played here today! :cry:" + }, "MORE_INFO": { "en": "More Information", "tr": "Daha Fazla Bilgi", diff --git a/modules/trivia/trivia.cpp b/modules/trivia/trivia.cpp index 0bbd9dd..ebf849c 100644 --- a/modules/trivia/trivia.cpp +++ b/modules/trivia/trivia.cpp @@ -478,10 +478,10 @@ void TriviaModule::show_stats(const std::string& interaction_token, dpp::snowfla msg.append(fmt::format("{}. <@{}> ({})\n", count++, r["snowflake_id"], r["dayscore"])); } } + guild_settings_t settings = GetGuildSettings(guild_id); if (msg.empty()) { - msg = "Nobody has played here today! :cry:"; + msg = _("NOBODY_PLAYED_TODAY", settings); } - guild_settings_t settings = GetGuildSettings(guild_id); if (settings.premium && !settings.custom_url.empty()) { EmbedWithFields(interaction_token, command_id, settings, _("LEADERBOARD", settings), {{_("TOP_TEN", settings), msg, false}, {_("MORE_INFO", settings), fmt::format(_("LEADER_LINK", settings), settings.custom_url), false}}, channel_id); } else {