1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 04:32:57 +08:00

Move localisation to existing file to avoid silly new class

This commit is contained in:
Dean Herbert 2024-05-11 20:25:47 +08:00
parent da096376af
commit ac7598cb68
No known key found for this signature in database
3 changed files with 8 additions and 21 deletions

View File

@ -1,19 +0,0 @@
// 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.
using osu.Framework.Localisation;
namespace osu.Game.Localisation
{
public static class FooterButtonModsV2Strings
{
private const string prefix = @"osu.Game.Resources.Localisation.FooterButtonModsV2";
/// <summary>
/// "{0} mods"
/// </summary>
public static LocalisableString Mods(int count) => new TranslatableString(getKey(@"mods"), @"{0} mods", count);
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -14,10 +14,16 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString ModSelectTitle => new TranslatableString(getKey(@"mod_select_title"), @"Mod Select");
/// <summary>
/// "{0} mods"
/// </summary>
public static LocalisableString Mods(int count) => new TranslatableString(getKey(@"mods"), @"{0} mods", count);
/// <summary>
/// "Mods provide different ways to enjoy gameplay. Some have an effect on the score you can achieve during ranked play. Others are just for fun."
/// </summary>
public static LocalisableString ModSelectDescription => new TranslatableString(getKey(@"mod_select_description"), @"Mods provide different ways to enjoy gameplay. Some have an effect on the score you can achieve during ranked play. Others are just for fun.");
public static LocalisableString ModSelectDescription => new TranslatableString(getKey(@"mod_select_description"),
@"Mods provide different ways to enjoy gameplay. Some have an effect on the score you can achieve during ranked play. Others are just for fun.");
/// <summary>
/// "Mod Customisation"

View File

@ -273,7 +273,7 @@ namespace osu.Game.Screens.Select.FooterV2
protected override void LoadComplete()
{
base.LoadComplete();
Mods.BindValueChanged(v => Text = FooterButtonModsV2Strings.Mods(v.NewValue.Count).ToUpper(), true);
Mods.BindValueChanged(v => Text = ModSelectOverlayStrings.Mods(v.NewValue.Count).ToUpper(), true);
}
public ITooltip<IReadOnlyList<Mod>> GetCustomTooltip() => new ModTooltip(colourProvider);