mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 05:52:56 +08:00
Add localisation for notification overlay
This commit is contained in:
parent
b3d4da8fc9
commit
c62d416680
@ -19,6 +19,21 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString HeaderDescription => new TranslatableString(getKey(@"header_description"), @"waiting for 'ya");
|
public static LocalisableString HeaderDescription => new TranslatableString(getKey(@"header_description"), @"waiting for 'ya");
|
||||||
|
|
||||||
private static string getKey(string key) => $"{prefix}:{key}";
|
/// <summary>
|
||||||
|
/// "Running Tasks"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString RunningTasks => new TranslatableString(getKey(@"running_tasks"), @"Running Tasks");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Clear All"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ClearAll => new TranslatableString(getKey(@"clear_all"), @"Clear All");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Cancel All"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString CancelAll => new TranslatableString(getKey(@"cancel_all"), @"Cancel All");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ namespace osu.Game.Overlays
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new NotificationSection(AccountsStrings.NotificationsTitle, new[] { typeof(SimpleNotification) }, "Clear All"),
|
new NotificationSection(AccountsStrings.NotificationsTitle, new[] { typeof(SimpleNotification) }, NotificationsStrings.ClearAll),
|
||||||
new NotificationSection(@"Running Tasks", new[] { typeof(ProgressNotification) }, @"Cancel All"),
|
new NotificationSection(NotificationsStrings.RunningTasks, new[] { typeof(ProgressNotification) }, NotificationsStrings.CancelAll),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,15 +33,15 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
|
|
||||||
public IEnumerable<Type> AcceptedNotificationTypes { get; }
|
public IEnumerable<Type> AcceptedNotificationTypes { get; }
|
||||||
|
|
||||||
private readonly string clearButtonText;
|
private readonly LocalisableString clearButtonText;
|
||||||
|
|
||||||
private readonly LocalisableString titleText;
|
private readonly LocalisableString titleText;
|
||||||
|
|
||||||
public NotificationSection(LocalisableString title, IEnumerable<Type> acceptedNotificationTypes, string clearButtonText)
|
public NotificationSection(LocalisableString title, IEnumerable<Type> acceptedNotificationTypes, LocalisableString clearButtonText)
|
||||||
{
|
{
|
||||||
AcceptedNotificationTypes = acceptedNotificationTypes.ToArray();
|
AcceptedNotificationTypes = acceptedNotificationTypes.ToArray();
|
||||||
|
|
||||||
this.clearButtonText = clearButtonText.ToUpperInvariant();
|
this.clearButtonText = clearButtonText.ToUpper();
|
||||||
titleText = title;
|
titleText = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user