feat(l10n): localise CornerRadius

This commit is contained in:
tsrk 2023-03-05 23:10:42 +00:00
parent 082bfe3621
commit 654eacd449
No known key found for this signature in database
GPG Key ID: EBD46BB3049B56D6
2 changed files with 12 additions and 1 deletions

View File

@ -39,6 +39,16 @@ namespace osu.Game.Localisation.SkinComponents
/// </summary>
public static LocalisableString TextElementTextDescription => new TranslatableString(getKey(@"text_element_text_description"), "The text to be displayed.");
/// <summary>
/// "Corner Radius"
/// </summary>
public static LocalisableString CornerRadius => new TranslatableString(getKey(@"corner_radius"), "Corner Radius");
/// <summary>
/// "How rounded the corners should be."
/// </summary>
public static LocalisableString CornerRadiusDescription => new TranslatableString(getKey(@"corner_radius_description"), "How rounded the corners should be.");
private static string getKey(string key) => $"{prefix}:{key}";
}
}

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Configuration;
using osu.Game.Localisation.SkinComponents;
using osu.Game.Skinning;
using osu.Game.Users.Drawables;
using osuTK;
@ -14,7 +15,7 @@ namespace osu.Game.Screens.Play.HUD
{
public partial class PlayerAvatar : CompositeDrawable, ISerialisableDrawable
{
[SettingSource("Corner radius", "How much the edges should be rounded.")]
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.CornerRadius), nameof(SkinnableComponentStrings.CornerRadiusDescription))]
public new BindableFloat CornerRadius { get; set; } = new BindableFloat
{
MinValue = 0,