mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge pull request #14003 from Game4all/localise-profile-overlay-header-stats
Localise profile overlay numeric statistics
This commit is contained in:
@ -7,6 +7,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Utils;
|
||||
@ -63,7 +64,7 @@ namespace osu.Game.Screens.Play.Break
|
||||
valueText.Text = newText;
|
||||
}
|
||||
|
||||
protected virtual string Format(T count)
|
||||
protected virtual LocalisableString Format(T count)
|
||||
{
|
||||
if (count is Enum countEnum)
|
||||
return countEnum.GetDescription();
|
||||
@ -86,6 +87,6 @@ namespace osu.Game.Screens.Play.Break
|
||||
{
|
||||
}
|
||||
|
||||
protected override string Format(double count) => count.FormatAccuracy();
|
||||
protected override LocalisableString Format(double count) => count.FormatAccuracy();
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -31,7 +32,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Current.BindTo(scoreProcessor.Combo);
|
||||
}
|
||||
|
||||
protected override string FormatCount(int count)
|
||||
protected override LocalisableString FormatCount(int count)
|
||||
{
|
||||
return $@"{count}x";
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -44,7 +45,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
|
||||
protected override Easing RollingEasing => AccuracyCircle.ACCURACY_TRANSFORM_EASING;
|
||||
|
||||
protected override string FormatCount(double count) => count.FormatAccuracy();
|
||||
protected override LocalisableString FormatCount(double count) => count.FormatAccuracy();
|
||||
|
||||
protected override OsuSpriteText CreateSpriteText() => base.CreateSpriteText().With(s =>
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -26,7 +27,7 @@ namespace osu.Game.Screens.Ranking.Expanded
|
||||
RelativeSizeAxes = Axes.X;
|
||||
}
|
||||
|
||||
protected override string FormatCount(long count) => count.ToString("N0");
|
||||
protected override LocalisableString FormatCount(long count) => count.ToString("N0");
|
||||
|
||||
protected override OsuSpriteText CreateSpriteText() => base.CreateSpriteText().With(s =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user