1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Revert blocking password requirement text localisation

This commit is contained in:
Joseph Madamba 2023-06-14 07:30:46 -07:00
parent 874ce4fe71
commit ed95fb5982
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76
2 changed files with 3 additions and 17 deletions

View File

@ -51,17 +51,6 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString MakeSureToGetIt => new TranslatableString(getKey(@"make_sure_to_get_it"), @" Make sure to get it right!");
/// <summary>
/// "At least {0}. Choose something long but also something you will remember, like a line from your favourite song."
/// </summary>
public static LocalisableString PasswordRequirements(string arg0) => new TranslatableString(getKey(@"password_requirements"),
@"At least {0}. Choose something long but also something you will remember, like a line from your favourite song.", arg0);
/// <summary>
/// "8 characters long"
/// </summary>
public static LocalisableString CharactersLong => new TranslatableString(getKey(@"characters_long"), @"8 characters long");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -139,12 +139,9 @@ namespace osu.Game.Overlays.AccountCreation
emailAddressDescription.AddText(AccountCreationStrings.EmailUsage);
emailAddressDescription.AddText(AccountCreationStrings.MakeSureToGetIt, cp => cp.Font = cp.Font.With(Typeface.Torus, weight: FontWeight.Bold));
string[] passwordReq = localisationManager.GetLocalisedBindableString(AccountCreationStrings.PasswordRequirements("{}")).Value.Split("{}");
if (passwordReq.Length != 2) passwordReq = AccountCreationStrings.PasswordRequirements("{}").ToString().Split("{}");
passwordDescription.AddText(passwordReq[0]);
characterCheckText = passwordDescription.AddText(AccountCreationStrings.CharactersLong);
passwordDescription.AddText(passwordReq[1]);
passwordDescription.AddText("At least ");
characterCheckText = passwordDescription.AddText("8 characters long");
passwordDescription.AddText(". Choose something long but also something you will remember, like a line from your favourite song.");
passwordTextBox.Current.BindValueChanged(_ => updateCharacterCheckTextColour(), true);
characterCheckText.DrawablePartsRecreated += _ => updateCharacterCheckTextColour();