mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
Localise notification in PerformFromMenuRunner
This commit is contained in:
@@ -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}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user