1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 21:42:55 +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 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();
} }
} }