Fix strings detections and translates the entire "Extensions" and "Timer" sections

This commit is contained in:
Felipe Giacomini Cocco 2026-02-05 19:56:10 -03:00
commit 879a4589d2
7 changed files with 188 additions and 36 deletions

View file

@ -462,8 +462,8 @@ enum TimerIconColorMode: String, CaseIterable, Identifiable, Defaults.Serializab
var displayName: String {
switch self {
case .adaptive: return "Adaptive gradient"
case .solid: return "Solid colour"
case .adaptive: return String(localized:"Adaptive gradient")
case .solid: return String(localized:"Solid colour")
}
}
}
@ -473,6 +473,13 @@ enum TimerProgressStyle: String, CaseIterable, Identifiable, Defaults.Serializab
case ring = "Ring"
var id: String { rawValue }
var localizedName: String {
switch self {
case .bar: return String(localized:"Bar")
case .ring: return String(localized:"Ring")
}
}
}
enum ReminderPresentationStyle: String, CaseIterable, Identifiable, Defaults.Serializable {

View file

@ -97,8 +97,8 @@ struct TimerPreset: Identifiable, Codable, Hashable, Defaults.Serializable {
}
static let defaultPresets: [TimerPreset] = [
TimerPreset(name: "Focus", duration: 25 * 60, color: Color.orange),
TimerPreset(name: "Break", duration: 5 * 60, color: Color.green),
TimerPreset(name: "Deep Work", duration: 45 * 60, color: Color.purple)
TimerPreset(name: String(localized:"Focus"), duration: 25 * 60, color: Color.orange),
TimerPreset(name: String(localized:"Break"), duration: 5 * 60, color: Color.green),
TimerPreset(name: String(localized:"Deep Work"), duration: 45 * 60, color: Color.purple)
]
}