From 908f5675bed53abc81488be730b995d2849afc73 Mon Sep 17 00:00:00 2001 From: Denis Titovets Date: Fri, 13 Mar 2026 22:21:26 +0300 Subject: [PATCH] Localise some strings on `SecondFactorAuthForm` --- osu.Game/Localisation/LoginPanelStrings.cs | 10 ++++++++++ osu.Game/Overlays/Login/SecondFactorAuthForm.cs | 9 +++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/osu.Game/Localisation/LoginPanelStrings.cs b/osu.Game/Localisation/LoginPanelStrings.cs index 925c2b91469f..243f0659065e 100644 --- a/osu.Game/Localisation/LoginPanelStrings.cs +++ b/osu.Game/Localisation/LoginPanelStrings.cs @@ -49,6 +49,16 @@ public static class LoginPanelStrings /// 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 2cdc4bf6a68f..38025de1d9bb 100644 --- a/osu.Game/Overlays/Login/SecondFactorAuthForm.cs +++ b/osu.Game/Overlays/Login/SecondFactorAuthForm.cs @@ -11,6 +11,7 @@ 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 @@ private void showEmailVerification() { 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 @@ private void showTotpVerification() { 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, },