Localise notification in PerformFromMenuRunner

This commit is contained in:
Denis Titovets
2026-01-11 16:17:09 +03:00
parent 3e7f0f4c61
commit f320592229
2 changed files with 11 additions and 1 deletions

View File

@@ -190,6 +190,11 @@ Click to see what's new!", version);
/// </summary>
public static LocalisableString CollectionsImportProgressTotal(int count, int totalCount) => new TranslatableString(getKey(@"collections_import_progress_total"), @"Imported {0} of {1} collections", count, totalCount);
/// <summary>
/// "An action was interrupted due to a dialog being displayed."
/// </summary>
public static LocalisableString ActionInterruptedByDialog => new TranslatableString(getKey(@"action_interrupted_by_dialog"), @"An action was interrupted due to a dialog being displayed.");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@@ -10,6 +10,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Framework.Threading;
using osu.Game.Localisation;
using osu.Game.Overlays;
using osu.Game.Overlays.Dialog;
using osu.Game.Overlays.Notifications;
@@ -165,7 +166,11 @@ namespace osu.Game
// the last dialog encountered has been dismissed but the screen has not changed, abort.
Cancel();
notifications.Post(new SimpleNotification { Text = @"An action was interrupted due to a dialog being displayed." });
notifications.Post(new SimpleNotification
{
Text = NotificationsStrings.ActionInterruptedByDialog
});
return true;
}