annotate src/gui/translate/anime.cpp @ 10:4b198a111713

Update things actually compile now btw qttest wants to fuck over the model but that might be my fault so /shrug
author Paper <mrpapersonic@gmail.com>
date Sat, 16 Sep 2023 02:06:01 -0400
parents 5c0397762b53
children cde8f67a7c7d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
1 #include "core/anime.h"
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
2
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
3 namespace Translate {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
4
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
5 std::string TranslateListStatus(const Anime::ListStatus status) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
6 switch (status) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
7 case Anime::ListStatus::NOT_IN_LIST: return "Not in list";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
8 case Anime::ListStatus::CURRENT: return "Currently watching";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
9 case Anime::ListStatus::PLANNING: return "Plan to watch";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
10 case Anime::ListStatus::COMPLETED: return "Completed";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
11 case Anime::ListStatus::DROPPED: return "Dropped";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
12 case Anime::ListStatus::PAUSED: return "On hold";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
13 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
14 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
15 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
16
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
17 std::string TranslateSeriesFormat(const Anime::SeriesFormat format) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
18 switch (format) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
19 case Anime::SeriesFormat::UNKNOWN: return "Unknown";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
20 case Anime::SeriesFormat::TV: return "TV";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
21 case Anime::SeriesFormat::TV_SHORT: return "TV short";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
22 case Anime::SeriesFormat::OVA: return "OVA";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
23 case Anime::SeriesFormat::MOVIE: return "Movie";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
24 case Anime::SeriesFormat::SPECIAL: return "Special";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
25 case Anime::SeriesFormat::ONA: return "ONA";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
26 case Anime::SeriesFormat::MUSIC: return "Music";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
27 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
28 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
29 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
30
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
31 std::string TranslateSeriesSeason(const Anime::SeriesSeason season) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
32 switch (season) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
33 case Anime::SeriesSeason::UNKNOWN: return "Unknown";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
34 case Anime::SeriesSeason::WINTER: return "Winter";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
35 case Anime::SeriesSeason::SUMMER: return "Summer";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
36 case Anime::SeriesSeason::FALL: return "Fall";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
37 case Anime::SeriesSeason::SPRING: return "Spring";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
38 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
39 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
40 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
41
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
42 std::string TranslateSeriesStatus(const Anime::SeriesStatus status) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
43 switch (status) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
44 case Anime::SeriesStatus::UNKNOWN: return "Unknown";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
45 case Anime::SeriesStatus::RELEASING: return "Currently airing";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
46 case Anime::SeriesStatus::FINISHED: return "Finished airing";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
47 case Anime::SeriesStatus::NOT_YET_RELEASED: return "Not yet aired";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
48 case Anime::SeriesStatus::CANCELLED: return "Cancelled";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
49 case Anime::SeriesStatus::HIATUS: return "On hiatus";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
50 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
51 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
52 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
53
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
54 } // namespace Translate