diff --git a/osu.Game/Localisation/NotificationsStrings.cs b/osu.Game/Localisation/NotificationsStrings.cs index 5e2600bc50..14ab3e7ff4 100644 --- a/osu.Game/Localisation/NotificationsStrings.cs +++ b/osu.Game/Localisation/NotificationsStrings.cs @@ -63,6 +63,31 @@ Please try changing your audio device to a working setting."); /// public static LocalisableString ScoreOverlayDisabled(LocalisableString arg0) => new TranslatableString(getKey(@"score_overlay_disabled"), @"The score overlay is currently disabled. You can toggle this by pressing {0}.", arg0); + /// + /// "The URL {0} has an unsupported or dangerous protocol and will not be opened" + /// + public static LocalisableString UnsupportedOrDangerousUrlProtocol(string url) => new TranslatableString(getKey(@"unsupported_or_dangerous_url_protocol"), @"The URL {0} has an unsupported or dangerous protocol and will not be opened.", url); + + /// + /// "Subsequent messages have been logged. Click to view log files" + /// + public static LocalisableString SubsequentMessagesLogged => new TranslatableString(getKey(@"subsequent_messages_logged"), @"Subsequent messages have been logged. Click to view log files"); + + /// + /// "Disabling tablet support due to error: "{0}"" + /// + public static LocalisableString TabletSupportDisabledDueToError(string message) => new TranslatableString(getKey(@"tablet_support_disabled_due_to_error"), @"Disabling tablet support due to error: ""{0}""", message); + + /// + /// "Encountered tablet warning, your tablet may not function correctly. Click here for a list of all tablets supported." + /// + public static LocalisableString EncounteredTabletWarning => new TranslatableString(getKey(@"encountered_tablet_warning"), @"Encountered tablet warning, your tablet may not function correctly. Click here for a list of all tablets supported."); + + /// + /// "This link type is not yet supported!" + /// + public static LocalisableString LinkTypeNotSupported => new TranslatableString(getKey(@"unsupported_link_type"), @"This link type is not yet supported!"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 8bfe48010b..fe98a8e286 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -435,7 +435,7 @@ namespace osu.Game case LinkAction.Spectate: waitForReady(() => Notifications, _ => Notifications.Post(new SimpleNotification { - Text = @"This link type is not yet supported!", + Text = NotificationsStrings.LinkTypeNotSupported, Icon = FontAwesome.Solid.LifeRing, })); break; @@ -477,7 +477,7 @@ namespace osu.Game { Notifications.Post(new SimpleErrorNotification { - Text = $"The URL {url} has an unsupported or dangerous protocol and will not be opened.", + Text = NotificationsStrings.UnsupportedOrDangerousUrlProtocol(url), }); return; @@ -1147,7 +1147,7 @@ namespace osu.Game Schedule(() => Notifications.Post(new SimpleNotification { Icon = FontAwesome.Solid.EllipsisH, - Text = "Subsequent messages have been logged. Click to view log files.", + Text = NotificationsStrings.SubsequentMessagesLogged, Activated = () => { Storage.GetStorageForDirectory(@"logs").PresentFileExternally(logFile); @@ -1179,7 +1179,7 @@ namespace osu.Game { Notifications.Post(new SimpleNotification { - Text = $"Disabling tablet support due to error: \"{message}\"", + Text = NotificationsStrings.TabletSupportDisabledDueToError(message), Icon = FontAwesome.Solid.PenSquare, IconColour = Colours.RedDark, }); @@ -1196,7 +1196,7 @@ namespace osu.Game { Schedule(() => Notifications.Post(new SimpleNotification { - Text = @"Encountered tablet warning, your tablet may not function correctly. Click here for a list of all tablets supported.", + Text = NotificationsStrings.EncounteredTabletWarning, Icon = FontAwesome.Solid.PenSquare, IconColour = Colours.YellowDark, Activated = () =>