From 8300e86f20815f9add57bdc4132437186af7346d Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Fri, 20 Sep 2019 15:46:43 +0300 Subject: [PATCH 1/4] Specify model name on import notification messages --- osu.Game/Database/ArchiveModelManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 6c79b0d472..969673993b 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Humanizer; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using osu.Framework; @@ -110,7 +111,7 @@ public Task Import(params string[] paths) protected async Task Import(ProgressNotification notification, params string[] paths) { notification.Progress = 0; - notification.Text = "Import is initialising..."; + notification.Text = $"{HumanisedModelName.Humanize()}s import is initialising..."; int current = 0; @@ -146,7 +147,7 @@ await Task.WhenAll(paths.Select(async path => if (imported.Count == 0) { - notification.Text = "Import failed!"; + notification.Text = $"{HumanisedModelName.Humanize()}s import failed!"; notification.State = ProgressNotificationState.Cancelled; } else From 3be03a26c93257dcfa0858dfca872b635127194f Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Fri, 20 Sep 2019 16:18:55 +0300 Subject: [PATCH 2/4] Pluralize instead of adding 's' --- osu.Game/Database/ArchiveModelManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 969673993b..dc17526201 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -111,7 +111,7 @@ public Task Import(params string[] paths) protected async Task Import(ProgressNotification notification, params string[] paths) { notification.Progress = 0; - notification.Text = $"{HumanisedModelName.Humanize()}s import is initialising..."; + notification.Text = $"{HumanisedModelName.Pluralize(paths.Length == 1)} import is initialising...".Humanize(); int current = 0; @@ -147,7 +147,7 @@ await Task.WhenAll(paths.Select(async path => if (imported.Count == 0) { - notification.Text = $"{HumanisedModelName.Humanize()}s import failed!"; + notification.Text = $"{HumanisedModelName.Pluralize(paths.Length == 1)} import failed!".Humanize(); notification.State = ProgressNotificationState.Cancelled; } else From 6bb0f3eb4149a3649c62543b16d765abcfa4f990 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 21 Sep 2019 20:04:12 +0300 Subject: [PATCH 3/4] Move humanizing to the model name instead --- osu.Game/Database/ArchiveModelManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index dc17526201..36084fefeb 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -111,7 +111,7 @@ public Task Import(params string[] paths) protected async Task Import(ProgressNotification notification, params string[] paths) { notification.Progress = 0; - notification.Text = $"{HumanisedModelName.Pluralize(paths.Length == 1)} import is initialising...".Humanize(); + notification.Text = $"{HumanisedModelName.Humanize().Pluralize(paths.Length == 1)} import is initialising..."; int current = 0; @@ -147,7 +147,7 @@ await Task.WhenAll(paths.Select(async path => if (imported.Count == 0) { - notification.Text = $"{HumanisedModelName.Pluralize(paths.Length == 1)} import failed!".Humanize(); + notification.Text = $"{HumanisedModelName.Humanize().Pluralize(paths.Length == 1)} import failed!"; notification.State = ProgressNotificationState.Cancelled; } else From 9be8bdef521d1a90f1e8462835bb308865994fab Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Sat, 21 Sep 2019 21:00:24 +0300 Subject: [PATCH 4/4] Remove pluralize and use title letter casing --- osu.Game/Database/ArchiveModelManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 36084fefeb..703cc53318 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -111,7 +111,7 @@ public Task Import(params string[] paths) protected async Task Import(ProgressNotification notification, params string[] paths) { notification.Progress = 0; - notification.Text = $"{HumanisedModelName.Humanize().Pluralize(paths.Length == 1)} import is initialising..."; + notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising..."; int current = 0; @@ -147,7 +147,7 @@ await Task.WhenAll(paths.Select(async path => if (imported.Count == 0) { - notification.Text = $"{HumanisedModelName.Humanize().Pluralize(paths.Length == 1)} import failed!"; + notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import failed!"; notification.State = ProgressNotificationState.Cancelled; } else