changeset 333:5980a960f3e1

translate/anime: use fmt for translating anime seasons
author Paper <paper@paper.us.eu.org>
date Mon, 17 Jun 2024 20:03:58 -0400
parents 92f63cf29faa
children 948955c3ba81
files src/gui/translate/anime.cc
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 <unordered_map>
 
+#include <fmt/core.h>
+
 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) {