mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 15:27:30 +08:00
Move dialog strings to more common class name
This commit is contained in:
parent
e52f524ea2
commit
5dfeaa3c4a
@ -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."
|
@ -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;
|
||||
|
@ -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()
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user