Localizations

This commit is contained in:
Arkadiusz Fal
2022-09-04 17:28:30 +02:00
parent 2d51f6adff
commit b66e177114
33 changed files with 2180 additions and 122 deletions

View File

@@ -1,4 +1,5 @@
import Defaults
import Foundation
enum TrendingCategory: String, CaseIterable, Identifiable, Defaults.Serializable {
case `default`, music, gaming, movies
@@ -8,14 +9,23 @@ enum TrendingCategory: String, CaseIterable, Identifiable, Defaults.Serializable
}
var title: RawValue {
rawValue.capitalized
switch self {
case .default:
return "All".localized()
case .music:
return "Music".localized()
case .gaming:
return "Gaming".localized()
case .movies:
return "Movies".localized()
}
}
var name: String {
id == "default" ? "Trending" : title
id == "default" ? "Trending".localized() : title
}
var controlLabel: String {
id == "default" ? "All" : title
id == "default" ? "All".localized() : title
}
}