Russian UI: settings, notch views, agent steps, errors; visible success after installing hooks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ struct ClaudePlanCardView: View {
|
||||
Circle()
|
||||
.fill(Color(hex: ClaudePlanGauge.color(for: dominant)))
|
||||
.frame(width: 7, height: 7)
|
||||
Text("Claude plan")
|
||||
Text("План Claude")
|
||||
.font(.system(size: 12, weight: .semibold))
|
||||
.foregroundColor(Color(hex: "#F5F6F8"))
|
||||
Text(subtitleText)
|
||||
@@ -30,8 +30,8 @@ struct ClaudePlanCardView: View {
|
||||
|
||||
// Gauge rows
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
GaugeRowView(label: "5 hours", window: usage?.fiveHour, now: now)
|
||||
GaugeRowView(label: "Week", window: usage?.sevenDay, now: now, weekly: true)
|
||||
GaugeRowView(label: "5 часов", window: usage?.fiveHour, now: now)
|
||||
GaugeRowView(label: "Неделя", window: usage?.sevenDay, now: now, weekly: true)
|
||||
}
|
||||
.padding(.top, 8)
|
||||
.padding(.leading, 108)
|
||||
@@ -48,21 +48,21 @@ struct ClaudePlanCardView: View {
|
||||
}
|
||||
|
||||
private var subtitleText: String {
|
||||
guard let usage else { return "Waiting for a Claude Code reply" }
|
||||
guard let usage else { return "Жду ответа Claude Code" }
|
||||
let diff = now.timeIntervalSince(usage.updatedAt)
|
||||
if diff < 60 { return "just now" }
|
||||
if diff < 60 { return "только что" }
|
||||
let mins = Int(diff / 60)
|
||||
if mins < 60 { return "\(mins) min ago" }
|
||||
return "\(mins / 60) h ago"
|
||||
if mins < 60 { return "\(mins) мин назад" }
|
||||
return "\(mins / 60) ч назад"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Gauge Row
|
||||
|
||||
// DateFormatter created once, in English, for the weekly reset label
|
||||
// DateFormatter created once, in Russian, for the weekly reset label
|
||||
private let weeklyResetFormatter: DateFormatter = {
|
||||
let fmt = DateFormatter()
|
||||
fmt.locale = Locale(identifier: "en_US_POSIX")
|
||||
fmt.locale = Locale(identifier: "ru_RU")
|
||||
fmt.dateFormat = "EEE H:mm"
|
||||
return fmt
|
||||
}()
|
||||
@@ -78,7 +78,7 @@ private struct GaugeRowView: View {
|
||||
Text(label)
|
||||
.font(.system(size: 11))
|
||||
.foregroundColor(Color(hex: "#6B7079"))
|
||||
.frame(width: 40, alignment: .leading)
|
||||
.frame(width: 46, alignment: .leading)
|
||||
if let w = window {
|
||||
let pct = ClaudePlanGauge.effectivePct(w)
|
||||
let accent = Color(hex: ClaudePlanGauge.color(for: pct))
|
||||
@@ -115,14 +115,14 @@ private struct GaugeRowView: View {
|
||||
|
||||
private func resetLabel(_ w: PlanWindow) -> String {
|
||||
let secs = w.resetsAt.timeIntervalSince(now)
|
||||
guard secs > 0 else { return "Resetting…" }
|
||||
guard secs > 0 else { return "Сброс…" }
|
||||
if weekly {
|
||||
return weeklyResetFormatter.string(from: w.resetsAt)
|
||||
} else {
|
||||
let h = Int(secs / 3600)
|
||||
let m = Int((secs.truncatingRemainder(dividingBy: 3600)) / 60)
|
||||
if h > 0 { return "in \(h) h \(m)" }
|
||||
return "in \(m) min"
|
||||
if h > 0 { return "через \(h) ч \(m) мин" }
|
||||
return "через \(m) мин"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user