From b84c9dfd84f206d3766b950803116fd687c61c7d Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 15 Oct 2019 00:35:44 +0300 Subject: [PATCH] Use Humanizer.ToQuantity instead of manual parsing --- osu.Game/Overlays/Comments/DeletedChildrenPlaceholder.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Comments/DeletedChildrenPlaceholder.cs b/osu.Game/Overlays/Comments/DeletedChildrenPlaceholder.cs index f537141d7f..21cf01f993 100644 --- a/osu.Game/Overlays/Comments/DeletedChildrenPlaceholder.cs +++ b/osu.Game/Overlays/Comments/DeletedChildrenPlaceholder.cs @@ -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(); } }