mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Localizations
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user