diff --git a/src/Files.App/Services/DateTimeFormatter/ApplicationDateTimeFormatter.cs b/src/Files.App/Services/DateTimeFormatter/ApplicationDateTimeFormatter.cs index d4a54a92de26..11ffcbe83a72 100644 --- a/src/Files.App/Services/DateTimeFormatter/ApplicationDateTimeFormatter.cs +++ b/src/Files.App/Services/DateTimeFormatter/ApplicationDateTimeFormatter.cs @@ -23,14 +23,10 @@ public override string ToShortLabel(DateTimeOffset offset) return elapsed switch { { TotalDays: >= 7 } => ToString(offset, "D"), - { TotalDays: >= 2 } => string.Format("DaysAgo".GetLocalizedResource(), elapsed.Days), - { TotalDays: >= 1 } => string.Format("DayAgo".GetLocalizedResource(), elapsed.Days), - { TotalHours: >= 2 } => string.Format("HoursAgo".GetLocalizedResource(), elapsed.Hours), - { TotalHours: >= 1 } => string.Format("HourAgo".GetLocalizedResource(), elapsed.Hours), - { TotalMinutes: >= 2 } => string.Format("MinutesAgo".GetLocalizedResource(), elapsed.Minutes), - { TotalMinutes: >= 1 } => string.Format("MinuteAgo".GetLocalizedResource(), elapsed.Minutes), - { TotalSeconds: >= 2 } => string.Format("SecondsAgo".GetLocalizedResource(), elapsed.Seconds), - { TotalSeconds: >= 1 } => "OneSecondAgo".GetLocalizedResource(), + { TotalDays: >= 1 } => "DaysAgo".GetLocalizedFormatResource(elapsed.Days), + { TotalHours: >= 1 } => "HoursAgo".GetLocalizedFormatResource(elapsed.Hours), + { TotalMinutes: >= 1 } => "MinutesAgo".GetLocalizedFormatResource(elapsed.Minutes), + { TotalSeconds: >= 1 } => "SecondsAgo".GetLocalizedFormatResource(elapsed.Seconds), { TotalSeconds: >= 0 } => "Now".GetLocalizedResource(), _ => ToString(offset, "D"), }; diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index e327e1dd40da..412af3910d40 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -385,28 +385,16 @@ Read-only - {0} days ago - - - {0} day ago + {0, plural, one {# day ago} other {# days ago}} - {0} hours ago - - - {0} hour ago + {0, plural, one {# hour ago} other {# hours ago}} - {0} minutes ago - - - {0} minute ago + {0, plural, one {# minute ago} other {# minutes ago}} - {0} seconds ago - - - 1 second ago + {0, plural, one {# second ago} other {# seconds ago}} Now