Specify model name on initialize and fail import notification m… (#6192)

Specify model name on initialize and fail import notification messages
This commit is contained in:
Dean Herbert 2019-09-22 15:54:04 +09:00 committed by GitHub
commit cdf29b0952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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(LetterCasing.Title)} 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(LetterCasing.Title)} import failed!";
notification.State = ProgressNotificationState.Cancelled;
}
else