From 1e356f61376984f11c23c5b03da8a3fa8a70c41b Mon Sep 17 00:00:00 2001 From: naoei Date: Wed, 10 Aug 2022 16:03:59 -0400 Subject: [PATCH] Revert localisation for `GetDisplayNameForHitResult` Came across an issue where `LeaderboardScoreTooltip` attempts to capitalize all letters for the `displayName`. Unsure if I should completely ignore it and localise it anyway. --- osu.Game/Rulesets/Ruleset.cs | 5 ++--- osu.Game/Scoring/HitResultDisplayStatistic.cs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/osu.Game/Rulesets/Ruleset.cs b/osu.Game/Rulesets/Ruleset.cs index 50ce6b3b12..c1ec6c30ef 100644 --- a/osu.Game/Rulesets/Ruleset.cs +++ b/osu.Game/Rulesets/Ruleset.cs @@ -28,7 +28,6 @@ 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; @@ -314,7 +313,7 @@ namespace osu.Game.Rulesets /// /// All valid s along with a display-friendly name. /// - public IEnumerable<(HitResult result, LocalisableString displayName)> GetHitResults() + public IEnumerable<(HitResult result, string displayName)> GetHitResults() { var validResults = GetValidHitResults(); @@ -352,7 +351,7 @@ namespace osu.Game.Rulesets /// /// The result type to get the name for. /// The display name. - public virtual LocalisableString GetDisplayNameForHitResult(HitResult result) => result.GetLocalisableDescription(); + public virtual string GetDisplayNameForHitResult(HitResult result) => result.GetDescription(); /// /// Creates ruleset-specific beatmap filter criteria to be used on the song select screen. diff --git a/osu.Game/Scoring/HitResultDisplayStatistic.cs b/osu.Game/Scoring/HitResultDisplayStatistic.cs index 20deff4875..4603ff053e 100644 --- a/osu.Game/Scoring/HitResultDisplayStatistic.cs +++ b/osu.Game/Scoring/HitResultDisplayStatistic.cs @@ -3,7 +3,6 @@ #nullable disable -using osu.Framework.Localisation; using osu.Game.Rulesets.Scoring; namespace osu.Game.Scoring @@ -31,9 +30,9 @@ namespace osu.Game.Scoring /// /// A custom display name for the result type. May be provided by rulesets to give better clarity. /// - public LocalisableString DisplayName { get; } + public string DisplayName { get; } - public HitResultDisplayStatistic(HitResult result, int count, int? maxCount, LocalisableString displayName) + public HitResultDisplayStatistic(HitResult result, int count, int? maxCount, string displayName) { Result = result; Count = count;