10
+ − 1 #include "core/anime.h"
15
+ − 2 #include "gui/translate/anime.h"
10
+ − 3
+ − 4 namespace Translate {
+ − 5
15
+ − 6 std::string ToString(const Anime::ListStatus status) {
10
+ − 7 switch (status) {
+ − 8 case Anime::ListStatus::NOT_IN_LIST: return "Not in list";
+ − 9 case Anime::ListStatus::CURRENT: return "Currently watching";
+ − 10 case Anime::ListStatus::PLANNING: return "Plan to watch";
+ − 11 case Anime::ListStatus::COMPLETED: return "Completed";
+ − 12 case Anime::ListStatus::DROPPED: return "Dropped";
+ − 13 case Anime::ListStatus::PAUSED: return "On hold";
+ − 14 default: return "";
+ − 15 }
+ − 16 }
+ − 17
15
+ − 18 std::string ToString(const Anime::SeriesFormat format) {
10
+ − 19 switch (format) {
+ − 20 case Anime::SeriesFormat::UNKNOWN: return "Unknown";
+ − 21 case Anime::SeriesFormat::TV: return "TV";
+ − 22 case Anime::SeriesFormat::TV_SHORT: return "TV short";
+ − 23 case Anime::SeriesFormat::OVA: return "OVA";
+ − 24 case Anime::SeriesFormat::MOVIE: return "Movie";
+ − 25 case Anime::SeriesFormat::SPECIAL: return "Special";
+ − 26 case Anime::SeriesFormat::ONA: return "ONA";
+ − 27 case Anime::SeriesFormat::MUSIC: return "Music";
+ − 28 default: return "";
+ − 29 }
+ − 30 }
+ − 31
15
+ − 32 std::string ToString(const Anime::SeriesSeason season) {
10
+ − 33 switch (season) {
+ − 34 case Anime::SeriesSeason::UNKNOWN: return "Unknown";
+ − 35 case Anime::SeriesSeason::WINTER: return "Winter";
+ − 36 case Anime::SeriesSeason::SUMMER: return "Summer";
+ − 37 case Anime::SeriesSeason::FALL: return "Fall";
+ − 38 case Anime::SeriesSeason::SPRING: return "Spring";
+ − 39 default: return "";
+ − 40 }
+ − 41 }
+ − 42
15
+ − 43 std::string ToString(const Anime::SeriesStatus status) {
10
+ − 44 switch (status) {
+ − 45 case Anime::SeriesStatus::UNKNOWN: return "Unknown";
+ − 46 case Anime::SeriesStatus::RELEASING: return "Currently airing";
+ − 47 case Anime::SeriesStatus::FINISHED: return "Finished airing";
+ − 48 case Anime::SeriesStatus::NOT_YET_RELEASED: return "Not yet aired";
+ − 49 case Anime::SeriesStatus::CANCELLED: return "Cancelled";
+ − 50 case Anime::SeriesStatus::HIATUS: return "On hiatus";
+ − 51 default: return "";
+ − 52 }
+ − 53 }
+ − 54
9
+ − 55 } // namespace Translate