Localise accuracy display.

This commit is contained in:
Lucas A
2021-07-23 22:37:08 +02:00
parent 00ec229bde
commit ff3d38de6f
12 changed files with 27 additions and 18 deletions

View File

@ -3,6 +3,7 @@
using System;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Graphics.Sprites;
using osu.Game.Utils;
@ -27,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
Current.Value = DisplayedCount = 1.0f;
}
protected override string FormatCount(double count) => count.FormatAccuracy();
protected override LocalisableString FormatCount(double count) => count.FormatAccuracy();
protected override double GetProportionalDuration(double currentValue, double newValue)
{

View File

@ -10,6 +10,7 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Localisation;
namespace osu.Game.Graphics.UserInterface
{
@ -137,8 +138,8 @@ namespace osu.Game.Graphics.UserInterface
/// Used to format counts.
/// </summary>
/// <param name="count">Count to format.</param>
/// <returns>Count formatted as a string.</returns>
protected virtual string FormatCount(T count)
/// <returns>Count formatted as a localisable string.</returns>
protected virtual LocalisableString FormatCount(T count)
{
return count.ToString();
}

View File

@ -3,6 +3,7 @@
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
@ -37,7 +38,7 @@ namespace osu.Game.Graphics.UserInterface
return currentValue > newValue ? currentValue - newValue : newValue - currentValue;
}
protected override string FormatCount(double count)
protected override LocalisableString FormatCount(double count)
{
string format = new string('0', RequiredDisplayDigits.Value);