mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +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
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue