1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 00:53:10 +08:00

Use Humanizer.ToQuantity instead of manual parsing

This commit is contained in:
Andrei Zavatski 2019-10-15 00:35:44 +03:00
parent 09621f066e
commit b84c9dfd84

View File

@ -7,6 +7,7 @@ using osu.Game.Graphics;
using osu.Framework.Graphics.Sprites;
using osuTK;
using osu.Framework.Bindables;
using Humanizer;
namespace osu.Game.Overlays.Comments
{
@ -62,12 +63,7 @@ namespace osu.Game.Overlays.Comments
return;
}
string str = $@"{count.NewValue} deleted comment";
if (!(count.NewValue.ToString().EndsWith("1") && !count.NewValue.ToString().EndsWith("11")))
str += "s";
countText.Text = str;
countText.Text = @"deleted comment".ToQuantity(count.NewValue);
Show();
}
}