forked from Automattic/pocket-casts-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataModel+Strings.swift
71 lines (66 loc) · 1.79 KB
/
DataModel+Strings.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import Foundation
import PocketCastsDataModel
extension UploadedSort: AnalyticsDescribable {
var description: String {
switch self {
case .newestToOldest:
return L10n.podcastsEpisodeSortNewestToOldest
case .oldestToNewest:
return L10n.podcastsEpisodeSortOldestToNewest
case .titleAtoZ:
return L10n.uploadSortAlpha
}
}
var analyticsDescription: String {
switch self {
case .newestToOldest:
return "newest_to_oldest"
case .oldestToNewest:
return "oldest_to_newest"
case .titleAtoZ:
return "title_a_to_z"
}
}
}
public extension PodcastGrouping {
var description: String {
switch self {
case .none:
return L10n.none
case .downloaded:
return L10n.statusDownloaded
case .unplayed:
return L10n.statusUnplayed
case .season:
return L10n.season
case .starred:
return L10n.statusStarred
}
}
}
public extension PlaylistSort {
var description: String {
switch self {
case .newestToOldest:
return L10n.podcastsEpisodeSortNewestToOldest
case .oldestToNewest:
return L10n.podcastsEpisodeSortOldestToNewest
case .shortestToLongest:
return L10n.podcastsEpisodeSortShortestToLongest
case .longestToShortest:
return L10n.podcastsEpisodeSortLongestToShortest
}
}
}
public extension AutoAddToUpNextSetting {
var description: String {
switch self {
case .off:
return L10n.off
case .addLast:
return L10n.autoAddToBottom
case .addFirst:
return L10n.autoAddToTop
}
}
}