1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:47:46 +08:00

Merge pull request #24064 from bastianpedersen/localise-common-game-notifications

Localise common game notifications
This commit is contained in:
Bartłomiej Dach 2023-06-27 22:40:22 +02:00 committed by GitHub
commit eb82bd3871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 5 deletions

View File

@ -63,6 +63,31 @@ Please try changing your audio device to a working setting.");
/// </summary>
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);
/// <summary>
/// "The URL {0} has an unsupported or dangerous protocol and will not be opened."
/// </summary>
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);
/// <summary>
/// "Subsequent messages have been logged. Click to view log files."
/// </summary>
public static LocalisableString SubsequentMessagesLogged => new TranslatableString(getKey(@"subsequent_messages_logged"), @"Subsequent messages have been logged. Click to view log files.");
/// <summary>
/// "Disabling tablet support due to error: &quot;{0}&quot;"
/// </summary>
public static LocalisableString TabletSupportDisabledDueToError(string message) => new TranslatableString(getKey(@"tablet_support_disabled_due_to_error"), @"Disabling tablet support due to error: ""{0}""", message);
/// <summary>
/// "Encountered tablet warning, your tablet may not function correctly. Click here for a list of all tablets supported."
/// </summary>
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.");
/// <summary>
/// "This link type is not yet supported!"
/// </summary>
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}";
}
}

View File

@ -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 = () =>