1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 19:32:55 +08:00

Move dialog strings to more common class name

This commit is contained in:
Dean Herbert 2024-05-31 11:46:32 +09:00
parent e52f524ea2
commit 5dfeaa3c4a
No known key found for this signature in database
3 changed files with 7 additions and 7 deletions

View File

@ -5,14 +5,14 @@ using osu.Framework.Localisation;
namespace osu.Game.Localisation namespace osu.Game.Localisation
{ {
public static class DeleteConfirmationDialogStrings public static class DialogStrings
{ {
private const string prefix = @"osu.Game.Resources.Localisation.DeleteConfirmationDialog"; private const string prefix = @"osu.Game.Resources.Localisation.DialogStrings";
/// <summary> /// <summary>
/// "Caution" /// "Caution"
/// </summary> /// </summary>
public static LocalisableString HeaderText => new TranslatableString(getKey(@"header_text"), @"Caution"); public static LocalisableString Caution => new TranslatableString(getKey(@"header_text"), @"Caution");
/// <summary> /// <summary>
/// "Yes. Go for it." /// "Yes. Go for it."

View File

@ -46,7 +46,7 @@ namespace osu.Game.Online.Chat
{ {
public ExternalLinkDialog(string url, Action openExternalLinkAction, Action copyExternalLinkAction) public ExternalLinkDialog(string url, Action openExternalLinkAction, Action copyExternalLinkAction)
{ {
HeaderText = DeleteConfirmationDialogStrings.HeaderText; HeaderText = DialogStrings.Caution;
BodyText = $"Are you sure you want to open the following link in a web browser?\n\n{url}"; BodyText = $"Are you sure you want to open the following link in a web browser?\n\n{url}";
Icon = FontAwesome.Solid.ExclamationTriangle; Icon = FontAwesome.Solid.ExclamationTriangle;

View File

@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Dialog
protected DangerousActionDialog() protected DangerousActionDialog()
{ {
HeaderText = DeleteConfirmationDialogStrings.HeaderText; HeaderText = DialogStrings.DialogCautionHeader;
Icon = FontAwesome.Regular.TrashAlt; Icon = FontAwesome.Regular.TrashAlt;
@ -38,12 +38,12 @@ namespace osu.Game.Overlays.Dialog
{ {
new PopupDialogDangerousButton new PopupDialogDangerousButton
{ {
Text = DeleteConfirmationDialogStrings.Confirm, Text = DialogStrings.DialogConfirm,
Action = () => DangerousAction?.Invoke() Action = () => DangerousAction?.Invoke()
}, },
new PopupDialogCancelButton new PopupDialogCancelButton
{ {
Text = DeleteConfirmationDialogStrings.Cancel, Text = DialogStrings.Cancel,
Action = () => CancelAction?.Invoke() Action = () => CancelAction?.Invoke()
} }
}; };