From c8c87089e58fa67ef7bd334eb9d0da4a92d2e579 Mon Sep 17 00:00:00 2001 From: CloneWith Date: Wed, 10 Sep 2025 07:49:14 +0800 Subject: [PATCH] Use LocalisableString interpolation to make strings update properly --- osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs | 4 ++-- osu.Game/Screens/OnlinePlay/Lounge/Components/EndDateInfo.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs b/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs index 149b0a25d8..848d510826 100644 --- a/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs +++ b/osu.Game.Tournament/Screens/Schedule/ScheduleScreen.cs @@ -266,8 +266,8 @@ namespace osu.Game.Tournament.Screens.Schedule } protected override LocalisableString Format() => Date < DateTimeOffset.Now - ? $"Started {base.Format()}" - : $"Starting {base.Format()}"; + ? LocalisableString.Interpolate($"Started {base.Format()}") + : LocalisableString.Interpolate($"Starting {base.Format()}"); } public partial class ScheduleContainer : Container diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/EndDateInfo.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/EndDateInfo.cs index 86a79ef0d6..4a98efb225 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/Components/EndDateInfo.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/EndDateInfo.cs @@ -71,7 +71,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components var diffToNow = Date.Subtract(DateTimeOffset.Now); if (diffToNow.TotalSeconds < -5) - return $"Closed {base.Format()}"; + return LocalisableString.Interpolate($"Closed {base.Format()}"); if (diffToNow.TotalSeconds < 0) return "Closed"; @@ -79,7 +79,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components if (diffToNow.TotalSeconds < 5) return "Closing soon"; - return $"Closing {base.Format()}"; + return LocalisableString.Interpolate($"Closing {base.Format()}"); } protected override void Dispose(bool isDisposing)