Localise hit result name

This commit is contained in:
naoei
2022-08-14 14:54:02 -04:00
parent 18ce784ae0
commit 45e9eda9e7
8 changed files with 21 additions and 13 deletions

View File

@ -28,6 +28,7 @@ using osu.Game.Users;
using JetBrains.Annotations;
using osu.Framework.Extensions;
using osu.Framework.Extensions.EnumExtensions;
using osu.Framework.Localisation;
using osu.Framework.Testing;
using osu.Game.Extensions;
using osu.Game.Rulesets.Filter;
@ -313,7 +314,7 @@ namespace osu.Game.Rulesets
/// <returns>
/// All valid <see cref="HitResult"/>s along with a display-friendly name.
/// </returns>
public IEnumerable<(HitResult result, string displayName)> GetHitResults()
public IEnumerable<(HitResult result, LocalisableString displayName)> GetHitResults()
{
var validResults = GetValidHitResults();
@ -351,7 +352,7 @@ namespace osu.Game.Rulesets
/// </summary>
/// <param name="result">The result type to get the name for.</param>
/// <returns>The display name.</returns>
public virtual string GetDisplayNameForHitResult(HitResult result) => result.GetDescription();
public virtual LocalisableString GetDisplayNameForHitResult(HitResult result) => result.GetLocalisableDescription();
/// <summary>
/// Creates ruleset-specific beatmap filter criteria to be used on the song select screen.