Add months to inline timer format

This commit is contained in:
Ali 2021-07-27 23:17:51 +02:00
parent 49a6c82560
commit 9a6ed3d181
2 changed files with 5 additions and 2 deletions

View File

@ -849,7 +849,8 @@
"MessageTimer.ShortWeeks_3_10" = "%@w";
"MessageTimer.ShortWeeks_any" = "%@w";
"MessageTimer.ShortWeeks_many" = "%@w";
"MessageTimer.ShortWeeks_0" = "%@w";
"MessageTimer.ShortMonths_1" = "%@mo";
"MessageTimer.ShortMonths_any" = "%@mo";
"Activity.UploadingPhoto" = "sending photo";
"Activity.UploadingVideo" = "sending video";

View File

@ -111,8 +111,10 @@ public func shortTimeIntervalString(strings: PresentationStrings, value: Int32)
return strings.MessageTimer_ShortHours(max(1, value / (60 * 60)))
} else if value < 60 * 60 * 24 * 7 {
return strings.MessageTimer_ShortDays(max(1, value / (60 * 60 * 24)))
} else {
} else if value < 60 * 60 * 24 * 31 {
return strings.MessageTimer_ShortWeeks(max(1, value / (60 * 60 * 24 * 7)))
} else {
return strings.MessageTimer_ShortMonths(max(1, value / (60 * 60 * 24 * 7 * 30)))
}
}