Fix playtime formatting (#32974)

This commit is contained in:
Stalen
2024-10-28 21:00:00 +03:00
committed by GitHub
parent ee445c4938
commit 24f79c3ecc
9 changed files with 34 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.Localizations;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
@@ -16,7 +17,7 @@ public sealed partial class PlaytimeStatsEntry : ContainerButton
RoleLabel.Text = role;
Playtime = playtime; // store the TimeSpan value directly
PlaytimeLabel.Text = playtime.ToString(Loc.GetString("ui-playtime-time-format")); // convert to string for display
PlaytimeLabel.Text = ContentLocalizationManager.FormatPlaytime(playtime); // convert to string for display
BackgroundColorPanel.PanelOverride = styleBox;
}