Add localisations for add preset button

This commit is contained in:
Bartłomiej Dach
2022-07-22 21:49:51 +02:00
parent 059a465fe8
commit 7251389e43
3 changed files with 21 additions and 5 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Localisation; using osu.Framework.Localisation;
@ -89,6 +89,16 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString Collections => new TranslatableString(getKey(@"collections"), @"Collections"); public static LocalisableString Collections => new TranslatableString(getKey(@"collections"), @"Collections");
/// <summary>
/// "Name"
/// </summary>
public static LocalisableString Name => new TranslatableString(getKey(@"name"), @"Name");
/// <summary>
/// "Description"
/// </summary>
public static LocalisableString Description => new TranslatableString(getKey(@"description"), @"Description");
private static string getKey(string key) => $@"{prefix}:{key}"; private static string getKey(string key) => $@"{prefix}:{key}";
} }
} }

View File

@ -29,6 +29,11 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString PersonalPresets => new TranslatableString(getKey(@"personal_presets"), @"Personal Presets"); public static LocalisableString PersonalPresets => new TranslatableString(getKey(@"personal_presets"), @"Personal Presets");
/// <summary>
/// "Add preset"
/// </summary>
public static LocalisableString AddPreset => new TranslatableString(getKey(@"add_preset"), @"Add preset");
private static string getKey(string key) => $@"{prefix}:{key}"; private static string getKey(string key) => $@"{prefix}:{key}";
} }
} }

View File

@ -12,6 +12,7 @@ using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Graphics.UserInterfaceV2;
using osuTK; using osuTK;
using osu.Game.Localisation;
namespace osu.Game.Overlays.Mods namespace osu.Game.Overlays.Mods
{ {
@ -71,21 +72,21 @@ namespace osu.Game.Overlays.Mods
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Label = "Name", Label = CommonStrings.Name,
TabbableContentContainer = this TabbableContentContainer = this
}, },
descriptionTextBox = new LabelledTextBox descriptionTextBox = new LabelledTextBox
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Label = "Description", Label = CommonStrings.Description,
TabbableContentContainer = this TabbableContentContainer = this
}, },
createButton = new ShearedButton createButton = new ShearedButton
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "Create preset", Text = ModSelectOverlayStrings.AddPreset,
Action = this.HidePopover Action = this.HidePopover
} }
} }