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
{
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>
/// "Caution"
/// </summary>
public static LocalisableString HeaderText => new TranslatableString(getKey(@"header_text"), @"Caution");
public static LocalisableString Caution => new TranslatableString(getKey(@"header_text"), @"Caution");
/// <summary>
/// "Yes. Go for it."

View File

@ -46,7 +46,7 @@ namespace osu.Game.Online.Chat
{
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}";
Icon = FontAwesome.Solid.ExclamationTriangle;

View File

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