annotate src/gui/translate/anime.cpp @ 62:4c6dd5999b39

*: update 1. updated animia 2. use widestrings for filesystem on Windows
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 06:16:06 -0400
parents 75c804f713b2
children 26721c28bf22
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"
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
2 #include "gui/translate/anime.h"
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
3 #include <QCoreApplication>
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
4
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
5 namespace Translate {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
6
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
7 std::string ToString(const Anime::ListStatus status) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
8 switch (status) {
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
9 case Anime::ListStatus::NOT_IN_LIST: return QCoreApplication::tr("Not in list").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
10 case Anime::ListStatus::CURRENT: return QCoreApplication::tr("Currently watching").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
11 case Anime::ListStatus::PLANNING: return QCoreApplication::tr("Plan to watch").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
12 case Anime::ListStatus::COMPLETED: return QCoreApplication::tr("Completed").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
13 case Anime::ListStatus::DROPPED: return QCoreApplication::tr("Dropped").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
14 case Anime::ListStatus::PAUSED: return QCoreApplication::tr("On hold").toStdString();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
15 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
16 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
17 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
18
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
19 std::string ToString(const Anime::SeriesFormat format) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
20 switch (format) {
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
21 case Anime::SeriesFormat::UNKNOWN: return QCoreApplication::tr("Unknown").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
22 case Anime::SeriesFormat::TV: return QCoreApplication::tr("TV").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
23 case Anime::SeriesFormat::TV_SHORT: return QCoreApplication::tr("TV short").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
24 case Anime::SeriesFormat::OVA: return QCoreApplication::tr("OVA").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
25 case Anime::SeriesFormat::MOVIE: return QCoreApplication::tr("Movie").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
26 case Anime::SeriesFormat::SPECIAL: return QCoreApplication::tr("Special").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
27 case Anime::SeriesFormat::ONA: return QCoreApplication::tr("ONA").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
28 case Anime::SeriesFormat::MUSIC: return QCoreApplication::tr("Music").toStdString();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
29 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
30 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
31 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
32
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
33 std::string ToString(const Anime::SeriesSeason season) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
34 switch (season) {
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
35 case Anime::SeriesSeason::UNKNOWN: return QCoreApplication::tr("Unknown").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
36 case Anime::SeriesSeason::WINTER: return QCoreApplication::tr("Winter").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
37 case Anime::SeriesSeason::SUMMER: return QCoreApplication::tr("Summer").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
38 case Anime::SeriesSeason::FALL: return QCoreApplication::tr("Fall").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
39 case Anime::SeriesSeason::SPRING: return QCoreApplication::tr("Spring").toStdString();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
40 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
41 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
42 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
43
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
44 std::string ToString(const Anime::SeriesStatus status) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
45 switch (status) {
51
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
46 case Anime::SeriesStatus::UNKNOWN: return QCoreApplication::tr("Unknown").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
47 case Anime::SeriesStatus::RELEASING: return QCoreApplication::tr("Currently airing").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
48 case Anime::SeriesStatus::FINISHED: return QCoreApplication::tr("Finished airing").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
49 case Anime::SeriesStatus::NOT_YET_RELEASED: return QCoreApplication::tr("Not yet aired").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
50 case Anime::SeriesStatus::CANCELLED: return QCoreApplication::tr("Cancelled").toStdString();
75c804f713b2 window: add about window,
Paper <mrpapersonic@gmail.com>
parents: 46
diff changeset
51 case Anime::SeriesStatus::HIATUS: return QCoreApplication::tr("On hiatus").toStdString();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
52 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
53 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
54 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
55
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 15
diff changeset
56 } // namespace Translate