Fix strings detections and translates the entire "Clipboard Manager" section and change the width to work better with all languages

This commit is contained in:
Felipe Giacomini Cocco 2026-02-05 14:57:27 -03:00
commit df66586602
3 changed files with 95 additions and 19 deletions

View file

@ -6114,7 +6114,7 @@ struct ClipboardSettings: View {
if enableClipboardManager {
Section {
Defaults.Toggle("Show Clipboard Icon", key: .showClipboardIcon)
Defaults.Toggle(String(localized: "Show Clipboard Icon"), key: .showClipboardIcon)
.settingsHighlight(id: highlightID("Show Clipboard Icon"))
HStack {
@ -6126,7 +6126,7 @@ struct ClipboardSettings: View {
}
}
.pickerStyle(.menu)
.frame(width: 100)
.frame(width: 200)
}
.settingsHighlight(id: highlightID("Display Mode"))
@ -6140,7 +6140,7 @@ struct ClipboardSettings: View {
Text("10 items").tag(10)
}
.pickerStyle(.menu)
.frame(width: 100)
.frame(width: 200)
}
.settingsHighlight(id: highlightID("History Size"))
@ -6237,16 +6237,16 @@ struct ClipboardSettings: 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")
}
}
}
@ -6413,16 +6413,16 @@ struct ScreenAssistantSettings: 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")
}
}
}