Localise "revert to default" tooltip

This commit is contained in:
ansel 2023-01-16 19:37:47 +03:00
parent 4224907f08
commit 26f3b1dbfe
2 changed files with 8 additions and 1 deletions

View File

@ -154,6 +154,11 @@ public static class CommonStrings
/// </summary>
public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"Exit");
/// <summary>
/// "Revert to default"
/// </summary>
public static LocalisableString RevertToDefault => new TranslatableString(getKey(@"revert_to_default"), @"Revert to default");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -6,6 +6,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
@ -17,6 +18,7 @@
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osu.Game.Localisation;
namespace osu.Game.Overlays
{
@ -96,7 +98,7 @@ protected override void LoadComplete()
FinishTransforms(true);
}
public override LocalisableString TooltipText => "revert to default";
public override LocalisableString TooltipText => CommonStrings.RevertToDefault.ToLower();
protected override bool OnHover(HoverEvent e)
{