Mercurial > minori
comparison src/gui/translate/anime.cc @ 81:9b2b41f83a5e
boring: mass rename to cc
because this is a very unix-y project, it makes more sense to use the
'cc' extension
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Mon, 23 Oct 2023 12:07:27 -0400 |
| parents | src/gui/translate/anime.cpp@26721c28bf22 |
| children | c4bb49c2f6eb |
comparison
equal
deleted
inserted
replaced
| 80:825506f0e221 | 81:9b2b41f83a5e |
|---|---|
| 1 #include "core/anime.h" | |
| 2 #include "core/strings.h" | |
| 3 #include "gui/translate/anime.h" | |
| 4 #include <QCoreApplication> | |
| 5 | |
| 6 namespace Translate { | |
| 7 | |
| 8 std::string ToString(const Anime::ListStatus status) { | |
| 9 switch (status) { | |
| 10 case Anime::ListStatus::NOT_IN_LIST: return Strings::ToUtf8String(QCoreApplication::tr("Not in list")); | |
| 11 case Anime::ListStatus::CURRENT: return Strings::ToUtf8String(QCoreApplication::tr("Currently watching")); | |
| 12 case Anime::ListStatus::PLANNING: return Strings::ToUtf8String(QCoreApplication::tr("Plan to watch")); | |
| 13 case Anime::ListStatus::COMPLETED: return Strings::ToUtf8String(QCoreApplication::tr("Completed")); | |
| 14 case Anime::ListStatus::DROPPED: return Strings::ToUtf8String(QCoreApplication::tr("Dropped")); | |
| 15 case Anime::ListStatus::PAUSED: return Strings::ToUtf8String(QCoreApplication::tr("On hold")); | |
| 16 default: return ""; | |
| 17 } | |
| 18 } | |
| 19 | |
| 20 std::string ToString(const Anime::SeriesFormat format) { | |
| 21 switch (format) { | |
| 22 case Anime::SeriesFormat::UNKNOWN: return Strings::ToUtf8String(QCoreApplication::tr("Unknown")); | |
| 23 case Anime::SeriesFormat::TV: return Strings::ToUtf8String(QCoreApplication::tr("TV")); | |
| 24 case Anime::SeriesFormat::TV_SHORT: return Strings::ToUtf8String(QCoreApplication::tr("TV short")); | |
| 25 case Anime::SeriesFormat::OVA: return Strings::ToUtf8String(QCoreApplication::tr("OVA")); | |
| 26 case Anime::SeriesFormat::MOVIE: return Strings::ToUtf8String(QCoreApplication::tr("Movie")); | |
| 27 case Anime::SeriesFormat::SPECIAL: return Strings::ToUtf8String(QCoreApplication::tr("Special")); | |
| 28 case Anime::SeriesFormat::ONA: return Strings::ToUtf8String(QCoreApplication::tr("ONA")); | |
| 29 case Anime::SeriesFormat::MUSIC: return Strings::ToUtf8String(QCoreApplication::tr("Music")); | |
| 30 default: return ""; | |
| 31 } | |
| 32 } | |
| 33 | |
| 34 std::string ToString(const Anime::SeriesSeason season) { | |
| 35 switch (season) { | |
| 36 case Anime::SeriesSeason::UNKNOWN: return Strings::ToUtf8String(QCoreApplication::tr("Unknown")); | |
| 37 case Anime::SeriesSeason::WINTER: return Strings::ToUtf8String(QCoreApplication::tr("Winter")); | |
| 38 case Anime::SeriesSeason::SUMMER: return Strings::ToUtf8String(QCoreApplication::tr("Summer")); | |
| 39 case Anime::SeriesSeason::FALL: return Strings::ToUtf8String(QCoreApplication::tr("Fall")); | |
| 40 case Anime::SeriesSeason::SPRING: return Strings::ToUtf8String(QCoreApplication::tr("Spring")); | |
| 41 default: return ""; | |
| 42 } | |
| 43 } | |
| 44 | |
| 45 std::string ToString(const Anime::SeriesStatus status) { | |
| 46 switch (status) { | |
| 47 case Anime::SeriesStatus::UNKNOWN: return Strings::ToUtf8String(QCoreApplication::tr("Unknown")); | |
| 48 case Anime::SeriesStatus::RELEASING: return Strings::ToUtf8String(QCoreApplication::tr("Currently airing")); | |
| 49 case Anime::SeriesStatus::FINISHED: return Strings::ToUtf8String(QCoreApplication::tr("Finished airing")); | |
| 50 case Anime::SeriesStatus::NOT_YET_RELEASED: return Strings::ToUtf8String(QCoreApplication::tr("Not yet aired")); | |
| 51 case Anime::SeriesStatus::CANCELLED: return Strings::ToUtf8String(QCoreApplication::tr("Cancelled")); | |
| 52 case Anime::SeriesStatus::HIATUS: return Strings::ToUtf8String(QCoreApplication::tr("On hiatus")); | |
| 53 default: return ""; | |
| 54 } | |
| 55 } | |
| 56 | |
| 57 } // namespace Translate |
