Add argument for play some ruleset string

This commit is contained in:
Joseph Madamba 2023-01-15 15:19:06 -08:00
parent 27671f0401
commit 0ff143d4c8
2 changed files with 3 additions and 5 deletions

View File

@ -30,10 +30,9 @@ namespace osu.Game.Localisation
public static LocalisableString HomeHeaderDescription => new TranslatableString(getKey(@"header_description"), @"return to the main menu");
/// <summary>
/// "play some"
/// "play some {0}"
/// </summary>
public static LocalisableString RulesetHeaderDescription => new TranslatableString(getKey(@"header_description"), @"play some");
public static LocalisableString PlaySomeRuleset(string arg0) => new TranslatableString(getKey(@"play_some_ruleset"), @"play some {0}", arg0);
private static string getKey(string key) => $@"{prefix}:{key}";
}

View File

@ -7,7 +7,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Rulesets;
using osuTK.Graphics;
@ -31,7 +30,7 @@ namespace osu.Game.Overlays.Toolbar
var rInstance = value.CreateInstance();
ruleset.TooltipMain = rInstance.Description;
ruleset.TooltipSub = LocalisableString.Format("{0} {1}", ToolbarStrings.RulesetHeaderDescription, ($"{rInstance.Description}"));
ruleset.TooltipSub = ToolbarStrings.PlaySomeRuleset(rInstance.Description);
ruleset.SetIcon(rInstance.CreateIcon());
}