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