mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Fix string detection issues and complete pt-BR localization (100% done, as far as I can tell)
This commit is contained in:
parent
879a4589d2
commit
f6f6321def
14 changed files with 402 additions and 77 deletions
|
|
@ -193,16 +193,16 @@ struct ClipboardItemRow: View {
|
|||
let interval = Date().timeIntervalSince(date)
|
||||
|
||||
if interval < 60 {
|
||||
return "Just now"
|
||||
return String(localized: "Just now")
|
||||
} else if interval < 3600 {
|
||||
let minutes = Int(interval / 60)
|
||||
return "\(minutes)m ago"
|
||||
return String(localized: "\(minutes)m ago")
|
||||
} else if interval < 86400 {
|
||||
let hours = Int(interval / 3600)
|
||||
return "\(hours)h ago"
|
||||
return String(localized: "\(hours)h ago")
|
||||
} else {
|
||||
let days = Int(interval / 86400)
|
||||
return "\(days)d ago"
|
||||
return String(localized: "\(days)d ago")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,16 +288,16 @@ struct ColorInfoPopup: View {
|
|||
let interval = Date().timeIntervalSince(date)
|
||||
|
||||
if interval < 60 {
|
||||
return "Just now"
|
||||
return String(localized: "Just now")
|
||||
} else if interval < 3600 {
|
||||
let minutes = Int(interval / 60)
|
||||
return "\(minutes)m ago"
|
||||
return String(localized: "\(minutes)m ago")
|
||||
} else if interval < 86400 {
|
||||
let hours = Int(interval / 3600)
|
||||
return "\(hours)h ago"
|
||||
return String(localized: "\(hours)h ago")
|
||||
} else {
|
||||
let days = Int(interval / 86400)
|
||||
return "\(days)d ago"
|
||||
return String(localized: "\(days)d ago")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -527,9 +527,9 @@ struct NotchClipboardItemRow: View {
|
|||
|
||||
private func timeAgoString(from date: Date) -> String {
|
||||
let interval = Date().timeIntervalSince(date)
|
||||
if interval < 60 { return "Just now" }
|
||||
if interval < 3600 { return "\(Int(interval/60))m" }
|
||||
return "\(Int(interval/3600))h"
|
||||
if interval < 60 { return String(localized: "Just now") }
|
||||
if interval < 3600 { return String(localized: "\(Int(interval/60))m") }
|
||||
return String(localized: "\(Int(interval/3600))h")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -936,9 +936,9 @@ struct NoteRow: View {
|
|||
|
||||
private func timeAgoString(from date: Date) -> String {
|
||||
let interval = Date().timeIntervalSince(date)
|
||||
if interval < 60 { return "Just now" }
|
||||
if interval < 3600 { return "\(Int(interval/60))m" }
|
||||
if interval < 86400 { return "\(Int(interval/3600))h" }
|
||||
if interval < 60 { return String(localized: "Just now") }
|
||||
if interval < 3600 { return String(localized: "\(Int(interval/60))m") }
|
||||
if interval < 86400 { return String(localized: "\(Int(interval/3600))h") }
|
||||
return date.formatted(.dateTime.day().month())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ struct NotchStatsView: View {
|
|||
|
||||
if showCpuGraph {
|
||||
graphs.append(SingleGraphData(
|
||||
title: "CPU",
|
||||
title: String(localized: "CPU"),
|
||||
value: statsManager.cpuUsageString,
|
||||
data: statsManager.cpuHistory,
|
||||
color: .blue,
|
||||
|
|
@ -92,7 +92,7 @@ struct NotchStatsView: View {
|
|||
|
||||
if showMemoryGraph {
|
||||
graphs.append(SingleGraphData(
|
||||
title: "Memory",
|
||||
title: String(localized: "Memory"),
|
||||
value: statsManager.memoryUsageString,
|
||||
data: statsManager.memoryHistory,
|
||||
color: .green,
|
||||
|
|
@ -102,7 +102,7 @@ struct NotchStatsView: View {
|
|||
|
||||
if showGpuGraph {
|
||||
graphs.append(SingleGraphData(
|
||||
title: "GPU",
|
||||
title: String(localized: "GPU"),
|
||||
value: statsManager.gpuUsageString,
|
||||
data: statsManager.gpuHistory,
|
||||
color: .purple,
|
||||
|
|
@ -112,7 +112,7 @@ struct NotchStatsView: View {
|
|||
|
||||
if showNetworkGraph {
|
||||
graphs.append(DualGraphData(
|
||||
title: "Network",
|
||||
title: String(localized: "Network"),
|
||||
positiveValue: "↓" + statsManager.networkDownloadString,
|
||||
negativeValue: "↑" + statsManager.networkUploadString,
|
||||
positiveData: statsManager.networkDownloadHistory,
|
||||
|
|
@ -126,9 +126,9 @@ struct NotchStatsView: View {
|
|||
|
||||
if showDiskGraph {
|
||||
graphs.append(DualGraphData(
|
||||
title: "Disk",
|
||||
positiveValue: "R " + statsManager.diskReadString,
|
||||
negativeValue: "W " + statsManager.diskWriteString,
|
||||
title: String(localized: "Disk"),
|
||||
positiveValue: String(localized: "R ") + statsManager.diskReadString,
|
||||
negativeValue: String(localized: "W ") + statsManager.diskWriteString,
|
||||
positiveData: statsManager.diskReadHistory,
|
||||
negativeData: statsManager.diskWriteHistory,
|
||||
positiveColor: .cyan,
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ struct NotchTimerView: View {
|
|||
private var startButton: some View {
|
||||
Button {
|
||||
withAnimation(.smooth) {
|
||||
timerManager.startTimer(duration: customDurationInSeconds, name: "Custom Timer")
|
||||
timerManager.startTimer(duration: customDurationInSeconds, name: String(localized: "Custom Timer"))
|
||||
if !enableMinimalisticUI {
|
||||
coordinator.currentView = .timer
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue