mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 12:42:56 +08:00
Use Humanizer.ToQuantity instead of manual parsing
This commit is contained in:
parent
09621f066e
commit
b84c9dfd84
@ -7,6 +7,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using Humanizer;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Comments
|
namespace osu.Game.Overlays.Comments
|
||||||
{
|
{
|
||||||
@ -62,12 +63,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string str = $@"{count.NewValue} deleted comment";
|
countText.Text = @"deleted comment".ToQuantity(count.NewValue);
|
||||||
|
|
||||||
if (!(count.NewValue.ToString().EndsWith("1") && !count.NewValue.ToString().EndsWith("11")))
|
|
||||||
str += "s";
|
|
||||||
|
|
||||||
countText.Text = str;
|
|
||||||
Show();
|
Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user