From 81328e258845771cfa5c2c9be2759ccb3ba0f904 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:00:24 +0100 Subject: [PATCH] fixme & seconds in time (more usual) --- Mods/vcmi/Content/config/english.json | 1 + client/GameChatHandler.cpp | 2 +- lib/texts/TextOperations.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Mods/vcmi/Content/config/english.json b/Mods/vcmi/Content/config/english.json index f648984bc..d5a7af9dd 100644 --- a/Mods/vcmi/Content/config/english.json +++ b/Mods/vcmi/Content/config/english.json @@ -166,6 +166,7 @@ "vcmi.lobby.login.create" : "New Account", "vcmi.lobby.login.login" : "Login", "vcmi.lobby.login.as" : "Login as %s", + "vcmi.lobby.login.spectator" : "Spectator", "vcmi.lobby.header.rooms" : "Game Rooms - %d", "vcmi.lobby.header.channels" : "Chat Channels", "vcmi.lobby.header.chat.global" : "Global Game Chat - %s", // %s -> language name diff --git a/client/GameChatHandler.cpp b/client/GameChatHandler.cpp index ceb9be0aa..34d5866e9 100644 --- a/client/GameChatHandler.cpp +++ b/client/GameChatHandler.cpp @@ -93,7 +93,7 @@ void GameChatHandler::onNewGameMessageReceived(PlayerColor sender, const std::st playerName = LOCPLINT->cb->getStartInfo()->playerInfos.at(sender).name; if (sender.isSpectator()) - playerName = "Spectator"; // FIXME: translate? Provide nickname somewhere? + playerName = VLC->generaltexth->translate("vcmi.lobby.login.spectator"); chatHistory.push_back({playerName, messageText, timeFormatted}); diff --git a/lib/texts/TextOperations.cpp b/lib/texts/TextOperations.cpp index ed46d9080..48fdde924 100644 --- a/lib/texts/TextOperations.cpp +++ b/lib/texts/TextOperations.cpp @@ -221,7 +221,7 @@ std::string TextOperations::getFormattedDateTimeLocal(std::time_t dt) std::string TextOperations::getFormattedTimeLocal(std::time_t dt) { - return vstd::getFormattedDateTime(dt, "%H:%M"); + return vstd::getFormattedDateTime(dt, "%H:%M:%S"); } std::string TextOperations::getCurrentFormattedTimeLocal(std::chrono::seconds timeOffset)