diff --git a/osu.Game/Localisation/LoginPanelStrings.cs b/osu.Game/Localisation/LoginPanelStrings.cs index 925c2b9146..243f065906 100644 --- a/osu.Game/Localisation/LoginPanelStrings.cs +++ b/osu.Game/Localisation/LoginPanelStrings.cs @@ -49,6 +49,16 @@ namespace osu.Game.Localisation /// public static LocalisableString Register => new TranslatableString(getKey(@"register"), @"Register"); + /// + /// "An email has been sent to you with a verification code. Enter the code." + /// + public static LocalisableString CodeSent => new TranslatableString(getKey(@"code_sent"), @"An email has been sent to you with a verification code. Enter the code."); + + /// + /// "Enter code" + /// + public static LocalisableString EnterCode => new TranslatableString(getKey(@"enter_code"), @"Enter code"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Overlays/Login/SecondFactorAuthForm.cs b/osu.Game/Overlays/Login/SecondFactorAuthForm.cs index 2cdc4bf6a6..38025de1d9 100644 --- a/osu.Game/Overlays/Login/SecondFactorAuthForm.cs +++ b/osu.Game/Overlays/Login/SecondFactorAuthForm.cs @@ -11,6 +11,7 @@ using osu.Framework.Logging; using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Graphics.UserInterface; +using osu.Game.Localisation; using osu.Game.Online.API; using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests.Responses; @@ -104,12 +105,12 @@ namespace osu.Game.Overlays.Login { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Text = "An email has been sent to you with a verification code. Enter the code.", + Text = LoginPanelStrings.CodeSent, }, codeTextBox = new OsuTextBox { InputProperties = new TextInputProperties(TextInputType.Code), - PlaceholderText = "Enter code", + PlaceholderText = LoginPanelStrings.EnterCode, RelativeSizeAxes = Axes.X, TabbableContentContainer = this, }, @@ -169,12 +170,12 @@ namespace osu.Game.Overlays.Login { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Text = "Please enter the code from your authenticator app.", + Text = UserVerificationStrings.BoxTotpHeading, }, codeTextBox = new OsuNumberBox { InputProperties = new TextInputProperties(TextInputType.NumericalPassword), - PlaceholderText = "Enter code", + PlaceholderText = LoginPanelStrings.EnterCode, RelativeSizeAxes = Axes.X, TabbableContentContainer = this, },