# HG changeset patch # User Paper # Date 1718669038 14400 # Node ID 5980a960f3e1df1f9d793bbb4e23ccfe6802ef22 # Parent 92f63cf29faa0cc26d3d98605a1c3a8719c0fa94 translate/anime: use fmt for translating anime seasons diff -r 92f63cf29faa -r 5980a960f3e1 src/gui/translate/anime.cc --- a/src/gui/translate/anime.cc Mon Jun 17 20:03:35 2024 -0400 +++ b/src/gui/translate/anime.cc Mon Jun 17 20:03:58 2024 -0400 @@ -6,6 +6,8 @@ #include +#include + namespace Translate { std::string ToString(const Anime::ListStatus status) { @@ -231,7 +233,7 @@ } } -std::string ToLocalString(const Anime::Season::Name season) { +static std::string ToLocalString(const Anime::Season::Name season) { switch (season) { case Anime::Season::Name::Winter: return Strings::Translate("Winter"); case Anime::Season::Name::Summer: return Strings::Translate("Summer"); @@ -245,7 +247,7 @@ std::string ToLocalString(const Anime::Season& season) { std::string year = (season.year) ? Strings::ToUtf8String(season.year) : Strings::Translate("Unknown"); - return ToLocalString(season.season) + " " + year; + return fmt::format(Strings::Translate("{} {}"), ToLocalString(season.season), year); } std::string ToLocalString(const Anime::SeriesStatus status) {