mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 23:54: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
|
|
@ -456,16 +456,16 @@ struct ClipboardPanelItemRow: 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,13 @@ enum ClipboardTab: String, CaseIterable {
|
|||
case .favorites: return "heart.fill"
|
||||
}
|
||||
}
|
||||
|
||||
var localizedName: String {
|
||||
switch self {
|
||||
case .history: return String(localized: "History")
|
||||
case .favorites: return String(localized: "Favorites")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ClipboardTabButton: View {
|
||||
|
|
@ -51,7 +58,7 @@ struct ClipboardTabButton: View {
|
|||
Image(systemName: tab.icon)
|
||||
.font(.system(size: 11))
|
||||
|
||||
Text(tab.rawValue)
|
||||
Text(tab.localizedName)
|
||||
.font(.system(size: 11, weight: .medium))
|
||||
|
||||
if itemCount > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue