fix: add missing "ago" for timestamp
This commit is contained in:
parent
c7edf45164
commit
cd31d79357
|
@ -174,7 +174,8 @@
|
|||
},
|
||||
"timeline": {
|
||||
"timestamp": {
|
||||
"now": "Now"
|
||||
"now": "Now",
|
||||
"time_ago": "%s ago"
|
||||
},
|
||||
"loader": {
|
||||
"load_missing_posts": "Load missing posts",
|
||||
|
|
|
@ -22,7 +22,8 @@ extension Date {
|
|||
if earlierDate.timeIntervalSince(latest) >= -60 {
|
||||
return L10n.Common.Controls.Timeline.Timestamp.now
|
||||
} else {
|
||||
return latest.shortTimeAgo(since: earlierDate)
|
||||
let interval = latest.shortTimeAgo(since: earlierDate) // 1s
|
||||
return L10n.Common.Controls.Timeline.Timestamp.timeAgo(interval) // 1s ago
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -383,6 +383,10 @@ internal enum L10n {
|
|||
internal enum Timestamp {
|
||||
/// Now
|
||||
internal static let now = L10n.tr("Localizable", "Common.Controls.Timeline.Timestamp.Now")
|
||||
/// %@ ago
|
||||
internal static func timeAgo(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "Common.Controls.Timeline.Timestamp.TimeAgo", String(describing: p1))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,6 +133,7 @@ Your account looks like this to them.";
|
|||
"Common.Controls.Timeline.Loader.LoadingMissingPosts" = "Loading missing posts...";
|
||||
"Common.Controls.Timeline.Loader.ShowMoreReplies" = "Show more replies";
|
||||
"Common.Controls.Timeline.Timestamp.Now" = "Now";
|
||||
"Common.Controls.Timeline.Timestamp.TimeAgo" = "%@ ago";
|
||||
"Common.Countable.Photo.Multiple" = "photos";
|
||||
"Common.Countable.Photo.Single" = "photo";
|
||||
"Scene.Compose.Accessibility.AppendAttachment" = "Append attachment";
|
||||
|
|
|
@ -133,6 +133,7 @@ Your account looks like this to them.";
|
|||
"Common.Controls.Timeline.Loader.LoadingMissingPosts" = "Loading missing posts...";
|
||||
"Common.Controls.Timeline.Loader.ShowMoreReplies" = "Show more replies";
|
||||
"Common.Controls.Timeline.Timestamp.Now" = "Now";
|
||||
"Common.Controls.Timeline.Timestamp.TimeAgo" = "%@ ago";
|
||||
"Common.Countable.Photo.Multiple" = "photos";
|
||||
"Common.Countable.Photo.Single" = "photo";
|
||||
"Scene.Compose.Accessibility.AppendAttachment" = "Append attachment";
|
||||
|
|
Loading…
Reference in New Issue