From 71d83e347bd03b38842d05741b606dd837a6b667 Mon Sep 17 00:00:00 2001 From: evill Date: Mon, 17 Mar 2025 15:05:47 +0200 Subject: [PATCH] add thousand separators --- .../Screens/Ranking/Statistics/User/GlobalRankChangeRow.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Ranking/Statistics/User/GlobalRankChangeRow.cs b/osu.Game/Screens/Ranking/Statistics/User/GlobalRankChangeRow.cs index 37268e05cd..ca1685e921 100644 --- a/osu.Game/Screens/Ranking/Statistics/User/GlobalRankChangeRow.cs +++ b/osu.Game/Screens/Ranking/Statistics/User/GlobalRankChangeRow.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System.Diagnostics; +using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Localisation; using osu.Game.Resources.Localisation.Web; using osu.Game.Utils; @@ -18,7 +19,7 @@ namespace osu.Game.Screens.Ranking.Statistics.User protected override LocalisableString Label => UsersStrings.ShowRankGlobalSimple; protected override LocalisableString FormatCurrentValue(int? current) - => current == null ? string.Empty : current.Value.ToString(); + => current == null ? string.Empty : current.Value.ToLocalisableString(@"N0"); protected override int CalculateDifference(int? previous, int? current, out LocalisableString formattedDifference) { @@ -46,9 +47,9 @@ namespace osu.Game.Screens.Ranking.Statistics.User int difference = previous.Value - current.Value; if (difference < 0) - formattedDifference = difference.ToString(); + formattedDifference = difference.ToLocalisableString(@"N0"); else if (difference > 0) - formattedDifference = LocalisableString.Interpolate($"+{difference.ToString()}"); + formattedDifference = LocalisableString.Interpolate($"+{difference.ToLocalisableString(@"N0")}"); else formattedDifference = string.Empty;