diff --git a/osu.Game/Localisation/ButtonSystemStrings.cs b/osu.Game/Localisation/ButtonSystemStrings.cs index 2bce75c010..ecb067e0ff 100644 --- a/osu.Game/Localisation/ButtonSystemStrings.cs +++ b/osu.Game/Localisation/ButtonSystemStrings.cs @@ -93,6 +93,11 @@ Your experience will not be perfect, and may even feel subpar compared to games Please bear with us as we continue to improve the game for you!"); + /// + /// "Understood" + /// + public static LocalisableString MobileDisclaimerOkButton => new TranslatableString(getKey(@"mobile_disclaimer_ok_button"), @"Understood"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Localisation/DialogStrings.cs b/osu.Game/Localisation/DialogStrings.cs index f50268dd03..05a7055cd6 100644 --- a/osu.Game/Localisation/DialogStrings.cs +++ b/osu.Game/Localisation/DialogStrings.cs @@ -49,6 +49,102 @@ namespace osu.Game.Localisation /// public static LocalisableString StableDirectoryLocationCancelButton => new TranslatableString(getKey(@"stable_directory_location_cancel_button"), @"Actually I don't have osu!stable installed."); + /// + /// "All local scores on {0}" + /// + public static LocalisableString BeatmapClearScoresBodyText(string difficulty) => new TranslatableString(getKey(@"beatmap_clear_scores_body_text"), @"All local scores on {0}", difficulty); + + /// + /// "Are you sure you want to close the following playlist:" + /// + public static LocalisableString ClosePlaylistHeaderText => new TranslatableString(getKey(@"close_playlist_header_text"), @"Are you sure you want to close the following playlist:"); + + /// + /// "Are you sure you want to abort the match?" + /// + public static LocalisableString ConfirmAbortMatchHeaderText => new TranslatableString(getKey(@"confirm_abort_match_header_text"), @"Are you sure you want to abort the match?"); + + /// + /// "Are you sure you want to exit osu!?" + /// + public static LocalisableString ConfirmExitHeaderText => new TranslatableString(getKey(@"confirm_exit_header_text"), @"Are you sure you want to exit osu!?"); + + /// + /// "Last chance to turn back" + /// + public static LocalisableString ConfirmDialogBodyText => new TranslatableString(getKey(@"confirm_exit_body_text"), @"Last chance to turn back"); + + /// + /// "There are currently some background operations which will be aborted if you continue: + /// + /// {0}" + /// + public static LocalisableString ConfirmExitBodyTextOngoingOperations(string ongoingOperationsText) => new TranslatableString(getKey(@"confirm_exit_body_text_ongoing_operations"), @"There are currently some background operations which will be aborted if you continue: + +{0}", ongoingOperationsText); + + /// + /// "There are currently some background operations which will be aborted if you continue: + /// + /// {0} + /// + /// and {1} other operation(s)." + /// + public static LocalisableString ConfirmExitBodyTextOtherOngoingOperations(string ongoingOperationsText, int count) => new TranslatableString(getKey(@"confirm_exit_body_text_other_ongoing_operations"), @"There are currently some background operations which will be aborted if you continue: + +{0} + +and {1} other operation(s).", ongoingOperationsText, count); + + /// + /// "Let me out!" + /// + public static LocalisableString ConfirmExitOkButton => new TranslatableString(getKey(@"confirm_exit_ok_button"), @"Let me out!"); + + /// + /// "Just a little more..." + /// + public static LocalisableString ConfirmExitCancelButton => new TranslatableString(getKey(@"confirm_exit_cancel_button"), @"Just a little more..."); + + /// + /// "Are you sure you want to go back?" + /// + public static LocalisableString ConfirmDiscardChangesHeaderText => new TranslatableString(getKey(@"confirm_discard_changes_header_text"), @"Are you sure you want to go back?"); + + /// + /// "This will discard any unsaved changes" + /// + public static LocalisableString ConfirmDiscardChangesBodyText => new TranslatableString(getKey(@"confirm_discard_changes_body_text"), @"This will discard any unsaved changes"); + + /// + /// "No I didn't mean to" + /// + public static LocalisableString ConfirmDiscardChangesCancelButton => new TranslatableString(getKey(@"confirm_discard_changes_cancel_button"), @"No I didn't mean to"); + + /// + /// "Are you sure you want to open the following link in a web browser? + /// + /// {0}" + /// + public static LocalisableString ExternalLinkBodyText(string url) => new TranslatableString(getKey(@"external_link_body_text"), @"Are you sure you want to open the following link in a web browser? + +{0}", url); + + /// + /// "Open in browser" + /// + public static LocalisableString ExternalLinkOkButton => new TranslatableString(getKey(@"external_link_ok_button"), @"Open in browser"); + + /// + /// "Do you really want to delete your comment?" + /// + public static LocalisableString DeleteCommentBodyText => new TranslatableString(getKey(@"delete_comment_body_text"), @"Do you really want to delete your comment?"); + + /// + /// "Are you sure you want to leave this multiplayer match?" + /// + public static LocalisableString ConfirmExitMultiplayerMatchBodyText => new TranslatableString(getKey(@"confirm_exit_multiplayer_match_body_text"), @"Are you sure you want to leave this multiplayer match?"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Localisation/EditorDialogsStrings.cs b/osu.Game/Localisation/EditorDialogsStrings.cs index 3617dca81f..ea4e3d0d55 100644 --- a/osu.Game/Localisation/EditorDialogsStrings.cs +++ b/osu.Game/Localisation/EditorDialogsStrings.cs @@ -59,6 +59,26 @@ namespace osu.Game.Localisation /// public static LocalisableString DiscardUnsavedChangesDialogHeader => new TranslatableString(getKey(@"discard_unsaved_changes_dialog_header"), @"Discard all unsaved changes? This cannot be undone."); + /// + /// "The beatmap will be saved to continue with this operation." + /// + public static LocalisableString SaveRequiredDialogHeader => new TranslatableString(getKey(@"save_required_dialog_header"), @"The beatmap will be saved to continue with this operation."); + + /// + /// "Sounds good, let's go!" + /// + public static LocalisableString SoundsGood => new TranslatableString(getKey(@"sounds_good"), @"Sounds good, let's go!"); + + /// + /// "Difficulty "{0}" with {1} objects" + /// + public static LocalisableString DeleteDifficultyDetails(string difficultyName, int objectCount) => new TranslatableString(getKey(@"delete_difficulty_details"), @"Difficulty ""{0}"" with {1} objects", difficultyName, objectCount); + + /// + /// "All Bookmarks" + /// + public static LocalisableString AllBookmarks => new TranslatableString(getKey(@"all_bookmarks"), @"All Bookmarks"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Online/Chat/ExternalLinkOpener.cs b/osu.Game/Online/Chat/ExternalLinkOpener.cs index 53faafcf36..708e9edefa 100644 --- a/osu.Game/Online/Chat/ExternalLinkOpener.cs +++ b/osu.Game/Online/Chat/ExternalLinkOpener.cs @@ -98,7 +98,7 @@ namespace osu.Game.Online.Chat public ExternalLinkDialog(string url, Action openExternalLinkAction, Action copyExternalLinkAction) { HeaderText = DialogStrings.CautionHeaderText; - BodyText = $"Are you sure you want to open the following link in a web browser?\n\n{url}"; + BodyText = DialogStrings.ExternalLinkBodyText(url); Icon = FontAwesome.Solid.ExclamationTriangle; @@ -106,7 +106,7 @@ namespace osu.Game.Online.Chat { new PopupDialogOkButton { - Text = @"Open in browser", + Text = DialogStrings.ExternalLinkOkButton, Action = openExternalLinkAction }, new PopupDialogCancelButton diff --git a/osu.Game/Overlays/Comments/DrawableComment.cs b/osu.Game/Overlays/Comments/DrawableComment.cs index 33f09b7622..c439905245 100644 --- a/osu.Game/Overlays/Comments/DrawableComment.cs +++ b/osu.Game/Overlays/Comments/DrawableComment.cs @@ -21,11 +21,12 @@ using System.Diagnostics; using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Logging; using osu.Game.Graphics.UserInterface; +using osu.Game.Localisation; using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Overlays.Comments.Buttons; using osu.Game.Overlays.Dialog; -using osu.Game.Resources.Localisation.Web; +using WebCommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings; namespace osu.Game.Overlays.Comments { @@ -324,13 +325,13 @@ namespace osu.Game.Overlays.Comments if (WasDeleted) makeDeleted(); - actionsContainer.AddLink(CommonStrings.ButtonsPermalink, () => game?.CopyToClipboard($@"{api.Endpoints.APIUrl}/comments/{Comment.Id}")); + actionsContainer.AddLink(WebCommonStrings.ButtonsPermalink, () => game?.CopyToClipboard($@"{api.Endpoints.APIUrl}/comments/{Comment.Id}")); actionsContainer.AddArbitraryDrawable(Empty().With(d => d.Width = 10)); - actionsContainer.AddLink(CommonStrings.ButtonsReply.ToLower(), toggleReply); + actionsContainer.AddLink(WebCommonStrings.ButtonsReply.ToLower(), toggleReply); actionsContainer.AddArbitraryDrawable(Empty().With(d => d.Width = 10)); if (Comment.UserId.HasValue && Comment.UserId.Value == api.LocalUser.Value.Id) - actionsContainer.AddLink(CommonStrings.ButtonsDelete.ToLower(), deleteComment); + actionsContainer.AddLink(WebCommonStrings.ButtonsDelete.ToLower(), deleteComment); else actionsContainer.AddArbitraryDrawable(new CommentReportButton(Comment)); @@ -384,7 +385,7 @@ namespace osu.Game.Overlays.Comments if (dialogOverlay == null) deleteCommentRequest(); else - dialogOverlay.Push(new ConfirmDialog("Do you really want to delete your comment?", deleteCommentRequest)); + dialogOverlay.Push(new ConfirmDialog(DialogStrings.DeleteCommentBodyText, deleteCommentRequest)); } /// diff --git a/osu.Game/Overlays/Dialog/ConfirmDialog.cs b/osu.Game/Overlays/Dialog/ConfirmDialog.cs index f1caac8b5d..f6a5ca4f9c 100644 --- a/osu.Game/Overlays/Dialog/ConfirmDialog.cs +++ b/osu.Game/Overlays/Dialog/ConfirmDialog.cs @@ -6,7 +6,8 @@ using System; using osu.Framework.Graphics.Sprites; using osu.Framework.Localisation; -using osu.Game.Resources.Localisation.Web; +using osu.Game.Localisation; +using WebCommonStrings = osu.Game.Resources.Localisation.Web.CommonStrings; namespace osu.Game.Overlays.Dialog { @@ -24,7 +25,7 @@ namespace osu.Game.Overlays.Dialog public ConfirmDialog(LocalisableString message, Action onConfirm, Action onCancel = null) { HeaderText = message; - BodyText = "Last chance to turn back"; + BodyText = DialogStrings.ConfirmDialogBodyText; Icon = FontAwesome.Solid.ExclamationTriangle; @@ -32,12 +33,12 @@ namespace osu.Game.Overlays.Dialog { new PopupDialogOkButton { - Text = @"Yes", + Text = DialogStrings.Confirm, Action = onConfirm }, new PopupDialogCancelButton { - Text = CommonStrings.ButtonsCancel, + Text = WebCommonStrings.ButtonsCancel, Action = onCancel }, }; diff --git a/osu.Game/Screens/Edit/BookmarkResetDialog.cs b/osu.Game/Screens/Edit/BookmarkResetDialog.cs index 48a0202c86..30a61c684a 100644 --- a/osu.Game/Screens/Edit/BookmarkResetDialog.cs +++ b/osu.Game/Screens/Edit/BookmarkResetDialog.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; +using osu.Game.Localisation; using osu.Game.Overlays.Dialog; namespace osu.Game.Screens.Edit @@ -13,7 +14,7 @@ namespace osu.Game.Screens.Edit public BookmarkResetDialog(EditorBeatmap editorBeatmap) { editor = editorBeatmap; - BodyText = "All Bookmarks"; + BodyText = EditorDialogsStrings.AllBookmarks; } [BackgroundDependencyLoader] @@ -23,4 +24,3 @@ namespace osu.Game.Screens.Edit } } } - diff --git a/osu.Game/Screens/Edit/DeleteDifficultyConfirmationDialog.cs b/osu.Game/Screens/Edit/DeleteDifficultyConfirmationDialog.cs index 1aeb1d8a40..ff69689c91 100644 --- a/osu.Game/Screens/Edit/DeleteDifficultyConfirmationDialog.cs +++ b/osu.Game/Screens/Edit/DeleteDifficultyConfirmationDialog.cs @@ -2,16 +2,16 @@ // See the LICENCE file in the repository root for full licence text. using System; -using osu.Game.Beatmaps; +using osu.Game.Localisation; using osu.Game.Overlays.Dialog; namespace osu.Game.Screens.Edit { public partial class DeleteDifficultyConfirmationDialog : DeletionDialog { - public DeleteDifficultyConfirmationDialog(BeatmapInfo beatmapInfo, Action deleteAction) + public DeleteDifficultyConfirmationDialog(string difficultyName, int objectCount, Action deleteAction) { - BodyText = $"\"{beatmapInfo.DifficultyName}\" difficulty"; + BodyText = EditorDialogsStrings.DeleteDifficultyDetails(difficultyName, objectCount); DangerousAction = deleteAction; } } diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs index 452419ca45..4ba1b2fac2 100644 --- a/osu.Game/Screens/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -1425,7 +1425,7 @@ namespace osu.Game.Screens.Edit if (dialogOverlay == null) delete(); else - dialogOverlay.Push(new DeleteDifficultyConfirmationDialog(Beatmap.Value.BeatmapInfo, delete)); + dialogOverlay.Push(new DeleteDifficultyConfirmationDialog(playableBeatmap.BeatmapInfo.DifficultyName, editorBeatmap.HitObjects.Count, delete)); void delete() { diff --git a/osu.Game/Screens/Edit/SaveRequiredPopupDialog.cs b/osu.Game/Screens/Edit/SaveRequiredPopupDialog.cs index 618efb7cda..5c69037825 100644 --- a/osu.Game/Screens/Edit/SaveRequiredPopupDialog.cs +++ b/osu.Game/Screens/Edit/SaveRequiredPopupDialog.cs @@ -3,6 +3,7 @@ using System; using osu.Framework.Graphics.Sprites; +using osu.Game.Localisation; using osu.Game.Overlays.Dialog; namespace osu.Game.Screens.Edit @@ -11,7 +12,7 @@ namespace osu.Game.Screens.Edit { public SaveRequiredPopupDialog(Action saveAndAction) { - HeaderText = "The beatmap will be saved to continue with this operation."; + HeaderText = EditorDialogsStrings.SaveRequiredDialogHeader; Icon = FontAwesome.Regular.Save; @@ -19,12 +20,12 @@ namespace osu.Game.Screens.Edit { new PopupDialogOkButton { - Text = "Sounds good, let's go!", + Text = EditorDialogsStrings.SoundsGood, Action = saveAndAction }, new PopupDialogCancelButton { - Text = "Oops, continue editing", + Text = EditorDialogsStrings.ContinueEditing, }, }; } diff --git a/osu.Game/Screens/Menu/ConfirmDiscardChangesDialog.cs b/osu.Game/Screens/Menu/ConfirmDiscardChangesDialog.cs index 0cd3e9ce71..b57d786f56 100644 --- a/osu.Game/Screens/Menu/ConfirmDiscardChangesDialog.cs +++ b/osu.Game/Screens/Menu/ConfirmDiscardChangesDialog.cs @@ -3,6 +3,7 @@ using System; using osu.Framework.Graphics.Sprites; +using osu.Game.Localisation; using osu.Game.Overlays.Dialog; namespace osu.Game.Screens.Menu @@ -16,8 +17,8 @@ namespace osu.Game.Screens.Menu /// An optional action to perform on cancel. public ConfirmDiscardChangesDialog(Action onConfirm, Action? onCancel = null) { - HeaderText = "Are you sure you want to go back?"; - BodyText = "This will discard any unsaved changes"; + HeaderText = DialogStrings.ConfirmDiscardChangesHeaderText; + BodyText = DialogStrings.ConfirmDiscardChangesBodyText; Icon = FontAwesome.Solid.ExclamationTriangle; @@ -25,12 +26,12 @@ namespace osu.Game.Screens.Menu { new PopupDialogDangerousButton { - Text = @"Yes", + Text = DialogStrings.Confirm, Action = onConfirm }, new PopupDialogCancelButton { - Text = @"No I didn't mean to", + Text = DialogStrings.ConfirmDiscardChangesCancelButton, Action = onCancel }, }; diff --git a/osu.Game/Screens/Menu/ConfirmExitDialog.cs b/osu.Game/Screens/Menu/ConfirmExitDialog.cs index e33071e78c..3e085ce063 100644 --- a/osu.Game/Screens/Menu/ConfirmExitDialog.cs +++ b/osu.Game/Screens/Menu/ConfirmExitDialog.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Localisation; using osu.Game.Overlays; using osu.Game.Overlays.Dialog; @@ -30,31 +31,29 @@ namespace osu.Game.Screens.Menu [BackgroundDependencyLoader] private void load(INotificationOverlay notifications) { - HeaderText = "Are you sure you want to exit osu!?"; + HeaderText = DialogStrings.ConfirmExitHeaderText; Icon = FontAwesome.Solid.ExclamationTriangle; if (notifications.HasOngoingOperations) { - string text = "There are currently some background operations which will be aborted if you continue:\n\n"; - var ongoingOperations = notifications.OngoingOperations.ToArray(); + string ongoingOperationsText = ongoingOperations.Take(10).Aggregate(string.Empty, (current, n) => current + $"{n.Text} ({n.Progress:0%})\n"); - foreach (var n in ongoingOperations.Take(10)) - text += $"{n.Text} ({n.Progress:0%})\n"; + LocalisableString ongoingOperationsLocalisableString; if (ongoingOperations.Length > 10) - text += $"\nand {ongoingOperations.Length - 10} other operation(s).\n"; + ongoingOperationsLocalisableString = DialogStrings.ConfirmExitBodyTextOtherOngoingOperations(ongoingOperationsText, ongoingOperations.Length - 10); + else + ongoingOperationsLocalisableString = DialogStrings.ConfirmExitBodyTextOngoingOperations(ongoingOperationsText); - text += "\nLast chance to turn back"; - - BodyText = text; + BodyText = LocalisableString.Interpolate($"{ongoingOperationsLocalisableString}\n\n{DialogStrings.ConfirmDialogBodyText}"); Buttons = new PopupDialogButton[] { new PopupDialogDangerousButton { - Text = @"Let me out!", + Text = DialogStrings.ConfirmExitOkButton, Action = onConfirm }, new PopupDialogCancelButton @@ -66,18 +65,18 @@ namespace osu.Game.Screens.Menu } else { - BodyText = "Last chance to turn back"; + BodyText = DialogStrings.ConfirmDialogBodyText; Buttons = new PopupDialogButton[] { new PopupDialogOkButton { - Text = @"Let me out!", + Text = DialogStrings.ConfirmExitOkButton, Action = onConfirm }, new PopupDialogCancelButton { - Text = @"Just a little more...", + Text = DialogStrings.ConfirmExitCancelButton, Action = onCancel }, }; diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 0820d33622..6e7e8e7a74 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -501,7 +501,7 @@ namespace osu.Game.Screens.Menu { new PopupDialogOkButton { - Text = "Understood", + Text = ButtonSystemStrings.MobileDisclaimerOkButton, Action = confirmed, }, }; diff --git a/osu.Game/Screens/OnlinePlay/Components/ConfirmExitMultiplayerMatchDialog.cs b/osu.Game/Screens/OnlinePlay/Components/ConfirmExitMultiplayerMatchDialog.cs new file mode 100644 index 0000000000..ad1e053726 --- /dev/null +++ b/osu.Game/Screens/OnlinePlay/Components/ConfirmExitMultiplayerMatchDialog.cs @@ -0,0 +1,17 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using osu.Game.Localisation; +using osu.Game.Overlays.Dialog; + +namespace osu.Game.Screens.OnlinePlay.Components +{ + public partial class ConfirmExitMultiplayerMatchDialog : ConfirmDialog + { + public ConfirmExitMultiplayerMatchDialog(Action onConfirm) + : base(DialogStrings.ConfirmExitMultiplayerMatchBodyText, onConfirm) + { + } + } +} diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/Match/ScreenMatchmaking.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/Match/ScreenMatchmaking.cs index d692783e48..0c0c1006ad 100644 --- a/osu.Game/Screens/OnlinePlay/Matchmaking/Match/ScreenMatchmaking.cs +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/Match/ScreenMatchmaking.cs @@ -30,6 +30,7 @@ using osu.Game.Overlays; using osu.Game.Overlays.Dialog; using osu.Game.Rulesets; using osu.Game.Screens.Footer; +using osu.Game.Screens.OnlinePlay.Components; using osu.Game.Screens.OnlinePlay.Matchmaking.Match.Gameplay; using osu.Game.Screens.OnlinePlay.Multiplayer; using osu.Game.Users; @@ -378,7 +379,7 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Match confirmDialog.PerformOkAction(); else { - dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () => + dialogOverlay.Push(new ConfirmExitMultiplayerMatchDialog(() => { exitConfirmed = true; if (this.IsCurrentScreen()) diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/RankedPlayScreen.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/RankedPlayScreen.cs index c61a8e1fc5..a6d152dfdf 100644 --- a/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/RankedPlayScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/RankedPlayScreen.cs @@ -29,6 +29,7 @@ using osu.Game.Overlays; using osu.Game.Overlays.Dialog; using osu.Game.Overlays.Volume; using osu.Game.Rulesets; +using osu.Game.Screens.OnlinePlay.Components; using osu.Game.Screens.OnlinePlay.Matchmaking.Match; using osu.Game.Screens.OnlinePlay.Matchmaking.Match.Gameplay; using osu.Game.Screens.OnlinePlay.Matchmaking.Queue; @@ -455,7 +456,7 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay confirmDialog.PerformOkAction(); else { - dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () => + dialogOverlay.Push(new ConfirmExitMultiplayerMatchDialog(() => { exitConfirmed = true; if (this.IsCurrentScreen()) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MatchStartControl.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MatchStartControl.cs index f73983217f..97f30035cf 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MatchStartControl.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MatchStartControl.cs @@ -12,6 +12,7 @@ using osu.Framework.Extensions.ObjectExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Threading; +using osu.Game.Localisation; using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer.Countdown; using osu.Game.Overlays; @@ -259,7 +260,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match { public ConfirmAbortDialog(Action abortMatch, Action cancel) { - HeaderText = "Are you sure you want to abort the match?"; + HeaderText = DialogStrings.ConfirmAbortMatchHeaderText; DangerousAction = abortMatch; CancelAction = cancel; diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs index ed4f431d4e..40c1309e90 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs @@ -878,7 +878,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer confirmDialog.PerformOkAction(); else { - dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () => + dialogOverlay.Push(new ConfirmExitMultiplayerMatchDialog(() => { ExitConfirmed = true; this.Exit(); diff --git a/osu.Game/Screens/OnlinePlay/Playlists/ClosePlaylistDialog.cs b/osu.Game/Screens/OnlinePlay/Playlists/ClosePlaylistDialog.cs index 08fed037d3..4dbe08e93e 100644 --- a/osu.Game/Screens/OnlinePlay/Playlists/ClosePlaylistDialog.cs +++ b/osu.Game/Screens/OnlinePlay/Playlists/ClosePlaylistDialog.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using osu.Game.Localisation; using osu.Game.Online.Rooms; using osu.Game.Overlays.Dialog; @@ -11,7 +12,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists { public ClosePlaylistDialog(Room room, Action closeAction) { - HeaderText = "Are you sure you want to close the following playlist:"; + HeaderText = DialogStrings.ClosePlaylistHeaderText; BodyText = room.Name; DangerousAction = closeAction; } diff --git a/osu.Game/Screens/Select/BeatmapClearScoresDialog.cs b/osu.Game/Screens/Select/BeatmapClearScoresDialog.cs index e3981c85f0..c681f89cd0 100644 --- a/osu.Game/Screens/Select/BeatmapClearScoresDialog.cs +++ b/osu.Game/Screens/Select/BeatmapClearScoresDialog.cs @@ -5,19 +5,20 @@ using System; using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Game.Beatmaps; +using osu.Game.Localisation; using osu.Game.Overlays.Dialog; using osu.Game.Scoring; namespace osu.Game.Screens.Select { - public partial class BeatmapClearScoresDialog : DangerousActionDialog + public partial class BeatmapClearScoresDialog : DeletionDialog { [Resolved] private ScoreManager scoreManager { get; set; } = null!; public BeatmapClearScoresDialog(BeatmapInfo beatmapInfo, Action? onCompletion = null) { - BodyText = $"All local scores on {beatmapInfo.GetDisplayTitle()}"; + BodyText = DialogStrings.BeatmapClearScoresBodyText(beatmapInfo.GetDisplayTitle()); DangerousAction = () => { Task.Run(() => scoreManager.Delete(beatmapInfo))