From 5dc44fbdf9dfaff573f596b0085a954c6f420e07 Mon Sep 17 00:00:00 2001 From: Denis Titovets Date: Sun, 17 Aug 2025 04:14:58 +0300 Subject: [PATCH 1/3] Add some localisation to `Play` screen --- .../UI/ReplayAnalysisSettings.cs | 13 ++++---- osu.Game/Localisation/BreakInfoStrings.cs | 24 +++++++++++++++ osu.Game/Localisation/PlayerLoaderStrings.cs | 30 +++++++++++++++++++ .../PlayerSettingsOverlayStrings.cs | 30 +++++++++++++++++++ osu.Game/Overlays/SettingsToolboxGroup.cs | 8 +++-- .../Screens/Play/BeatmapMetadataDisplay.cs | 3 +- osu.Game/Screens/Play/Break/BreakInfo.cs | 6 ++-- .../Play/PlayerSettings/AudioSettings.cs | 2 +- .../Play/PlayerSettings/InputSettings.cs | 2 +- .../Play/PlayerSettings/PlaybackSettings.cs | 4 +-- .../PlayerSettings/PlayerSettingsGroup.cs | 3 +- .../Play/PlayerSettings/VisualSettings.cs | 2 +- 12 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 osu.Game/Localisation/BreakInfoStrings.cs diff --git a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs index dc4730d76a..69afae4f57 100644 --- a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs +++ b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs @@ -4,6 +4,7 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Game.Configuration; +using osu.Game.Localisation; using osu.Game.Rulesets.Osu.Configuration; using osu.Game.Screens.Play.PlayerSettings; @@ -13,19 +14,19 @@ namespace osu.Game.Rulesets.Osu.UI { private readonly OsuRulesetConfigManager config; - [SettingSource("Show click markers", SettingControlType = typeof(PlayerCheckbox))] + [SettingSource(typeof(PlayerSettingsOverlayStrings), nameof(PlayerSettingsOverlayStrings.ShowClickMarkers), SettingControlType = typeof(PlayerCheckbox))] public BindableBool ShowClickMarkers { get; } = new BindableBool(); - [SettingSource("Show frame markers", SettingControlType = typeof(PlayerCheckbox))] + [SettingSource(typeof(PlayerSettingsOverlayStrings), nameof(PlayerSettingsOverlayStrings.ShowFrameMarkers), SettingControlType = typeof(PlayerCheckbox))] public BindableBool ShowAimMarkers { get; } = new BindableBool(); - [SettingSource("Show cursor path", SettingControlType = typeof(PlayerCheckbox))] + [SettingSource(typeof(PlayerSettingsOverlayStrings), nameof(PlayerSettingsOverlayStrings.ShowCursorPath), SettingControlType = typeof(PlayerCheckbox))] public BindableBool ShowCursorPath { get; } = new BindableBool(); - [SettingSource("Hide gameplay cursor", SettingControlType = typeof(PlayerCheckbox))] + [SettingSource(typeof(PlayerSettingsOverlayStrings), nameof(PlayerSettingsOverlayStrings.HideGameplayCursor), SettingControlType = typeof(PlayerCheckbox))] public BindableBool HideSkinCursor { get; } = new BindableBool(); - [SettingSource("Display length", SettingControlType = typeof(PlayerSliderBar))] + [SettingSource(typeof(PlayerSettingsOverlayStrings), nameof(PlayerSettingsOverlayStrings.DisplayLength), SettingControlType = typeof(PlayerSliderBar))] public BindableInt DisplayLength { get; } = new BindableInt { MinValue = 200, @@ -35,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.UI }; public ReplayAnalysisSettings(OsuRulesetConfigManager config) - : base("Analysis Settings") + : base(PlayerLoaderStrings.AnalysisSettingsTitle) { this.config = config; } diff --git a/osu.Game/Localisation/BreakInfoStrings.cs b/osu.Game/Localisation/BreakInfoStrings.cs new file mode 100644 index 0000000000..e327676e27 --- /dev/null +++ b/osu.Game/Localisation/BreakInfoStrings.cs @@ -0,0 +1,24 @@ +// Copyright (c) ppy Pty Ltd . 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 class BreakInfoStrings + { + private const string prefix = @"osu.Game.Resources.Localisation.BreakInfo"; + + /// + /// "Current Progress" + /// + public static LocalisableString CurrentProgressTitle => new TranslatableString(getKey(@"current_progress_title"), @"Current Progress"); + + /// + /// "Grade" + /// + public static LocalisableString ShowInfoGrade => new TranslatableString(getKey(@"show_info_grade"), @"Grade"); + + private static string getKey(string key) => $@"{prefix}:{key}"; + } +} diff --git a/osu.Game/Localisation/PlayerLoaderStrings.cs b/osu.Game/Localisation/PlayerLoaderStrings.cs index f9d6f80676..aa2f9e4b7e 100644 --- a/osu.Game/Localisation/PlayerLoaderStrings.cs +++ b/osu.Game/Localisation/PlayerLoaderStrings.cs @@ -43,6 +43,36 @@ Leaderboards may be reset."); public static LocalisableString QualifiedBeatmapDisclaimerContent => new TranslatableString(getKey(@"qualified_beatmap_disclaimer_content"), @"No performance points will be awarded. Leaderboards will be reset when the beatmap is ranked."); + /// + /// "Mapper" + /// + public static LocalisableString ShowInfoMapper => new TranslatableString(getKey(@"show_info_mapper"), @"Mapper"); + + /// + /// "Playback" + /// + public static LocalisableString PlaybackTitle => new TranslatableString(getKey(@"playback_title"), @"Playback"); + + /// + /// "Visual Settings" + /// + public static LocalisableString VisualSettingsTitle => new TranslatableString(getKey(@"visual_settings_title"), @"Visual Settings"); + + /// + /// "Audio Settings" + /// + public static LocalisableString AudioSettingsTitle => new TranslatableString(getKey(@"audio_settings_title"), @"Audio Settings"); + + /// + /// "Input Settings" + /// + public static LocalisableString InputSettingsTitle => new TranslatableString(getKey(@"input_settings_title"), @"Input Settings"); + + /// + /// "Analysis Settings" + /// + public static LocalisableString AnalysisSettingsTitle => new TranslatableString(getKey(@"analysis_settings_title"), @"Analysis Settings"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs b/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs index 60874da561..ca37fd27d9 100644 --- a/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs +++ b/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs @@ -29,6 +29,36 @@ namespace osu.Game.Localisation /// public static LocalisableString SeekForwardSeconds(double arg0) => new TranslatableString(getKey(@"seek_forward_seconds"), @"Seek forward {0} seconds", arg0); + /// + /// "Playback speed" + /// + public static LocalisableString PlaybackSpeed => new TranslatableString(getKey(@"playback_speed"), @"Playback speed"); + + /// + /// "Show click markers" + /// + public static LocalisableString ShowClickMarkers => new TranslatableString(getKey(@"show_click_markers"), @"Show click markers"); + + /// + /// "Show frame markers" + /// + public static LocalisableString ShowFrameMarkers => new TranslatableString(getKey(@"show_frame_markers"), @"Show frame markers"); + + /// + /// "Show cursor path" + /// + public static LocalisableString ShowCursorPath => new TranslatableString(getKey(@"show_cursor_path"), @"Show cursor path"); + + /// + /// "Hide gameplay cursor" + /// + public static LocalisableString HideGameplayCursor => new TranslatableString(getKey(@"hide_gameplay_cursor"), @"Hide gameplay cursor"); + + /// + /// "Display length" + /// + public static LocalisableString DisplayLength => new TranslatableString(getKey(@"display_length"), @"Display length"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Overlays/SettingsToolboxGroup.cs b/osu.Game/Overlays/SettingsToolboxGroup.cs index b1a0ca0ccd..d82118fa1a 100644 --- a/osu.Game/Overlays/SettingsToolboxGroup.cs +++ b/osu.Game/Overlays/SettingsToolboxGroup.cs @@ -3,12 +3,14 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Input; using osu.Framework.Input.Events; +using osu.Framework.Localisation; using osu.Framework.Utils; using osu.Game.Graphics; using osu.Game.Graphics.Containers; @@ -21,7 +23,7 @@ namespace osu.Game.Overlays { public partial class SettingsToolboxGroup : Container, IExpandable { - private readonly string title; + private readonly LocalisableString title; public const int CONTAINER_WIDTH = 270; private const float transition_duration = 250; @@ -60,7 +62,7 @@ namespace osu.Game.Overlays /// Create a new instance. /// /// The title to be displayed in the header of this group. - public SettingsToolboxGroup(string title) + public SettingsToolboxGroup(LocalisableString title) { this.title = title; @@ -102,7 +104,7 @@ namespace osu.Game.Overlays { Origin = Anchor.CentreLeft, Anchor = Anchor.CentreLeft, - Text = title.ToUpperInvariant(), + Text = title.ToUpper(), Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 17), Padding = new MarginPadding { Left = 10, Right = 30 }, }, diff --git a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs index 08ea0d0a90..b9f0c0aba1 100644 --- a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs +++ b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs @@ -15,6 +15,7 @@ using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; +using osu.Game.Localisation; using osu.Game.Resources.Localisation.Web; using osu.Game.Rulesets.Mods; using osu.Game.Screens.Play.HUD; @@ -165,7 +166,7 @@ namespace osu.Game.Screens.Play }, new Drawable[] { - new MetadataLineLabel("Mapper"), + new MetadataLineLabel(PlayerLoaderStrings.ShowInfoMapper), new MetadataLineInfo(metadata.Author.Username) } } diff --git a/osu.Game/Screens/Play/Break/BreakInfo.cs b/osu.Game/Screens/Play/Break/BreakInfo.cs index ef453405b5..28c38dce2b 100644 --- a/osu.Game/Screens/Play/Break/BreakInfo.cs +++ b/osu.Game/Screens/Play/Break/BreakInfo.cs @@ -1,10 +1,12 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; +using osu.Game.Localisation; using osu.Game.Resources.Localisation.Web; using osu.Game.Scoring; using osuTK; @@ -32,7 +34,7 @@ namespace osu.Game.Screens.Play.Break { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - Text = "current progress".ToUpperInvariant(), + Text = BreakInfoStrings.CurrentProgressTitle.ToUpper(), Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15), }, new FillFlowContainer @@ -46,7 +48,7 @@ namespace osu.Game.Screens.Play.Break AccuracyDisplay = new PercentageBreakInfoLine(BeatmapsetsStrings.ShowScoreboardHeadersAccuracy), // See https://github.com/ppy/osu/discussions/15185 // RankDisplay = new BreakInfoLine("Rank"), - GradeDisplay = new BreakInfoLine("Grade"), + GradeDisplay = new BreakInfoLine(BreakInfoStrings.ShowInfoGrade), }, } }, diff --git a/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs b/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs index 3c79721590..66a980e270 100644 --- a/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs @@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private readonly PlayerCheckbox beatmapHitsoundsToggle; public AudioSettings() - : base("Audio Settings") + : base(PlayerLoaderStrings.AudioSettingsTitle) { Children = new Drawable[] { diff --git a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs index 1387e01305..3243e60c58 100644 --- a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play.PlayerSettings public partial class InputSettings : PlayerSettingsGroup { public InputSettings() - : base("Input Settings") + : base(PlayerLoaderStrings.InputSettingsTitle) { } diff --git a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs index b3d07421ed..de69a6f3c1 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs @@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private IconButton pausePlay = null!; public PlaybackSettings() - : base("playback") + : base(PlayerLoaderStrings.PlaybackTitle) { } @@ -138,7 +138,7 @@ namespace osu.Game.Screens.Play.PlayerSettings { rateSlider = new PlayerSliderBar { - LabelText = "Playback speed", + LabelText = PlayerSettingsOverlayStrings.PlaybackSpeed, Current = UserPlaybackRate, }, multiplierText = new OsuSpriteText diff --git a/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs b/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs index 838106e198..0f9a00dfd2 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlayerSettingsGroup.cs @@ -2,13 +2,14 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Input.Events; +using osu.Framework.Localisation; using osu.Game.Overlays; namespace osu.Game.Screens.Play.PlayerSettings { public partial class PlayerSettingsGroup : SettingsToolboxGroup { - public PlayerSettingsGroup(string title) + public PlayerSettingsGroup(LocalisableString title) : base(title) { } diff --git a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs index ff857ddb12..c7cf25d23a 100644 --- a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private readonly PlayerCheckbox beatmapColorsToggle; public VisualSettings() - : base("Visual Settings") + : base(PlayerLoaderStrings.VisualSettingsTitle) { Children = new Drawable[] { From e183e6bb887d10d42b3ce65631f7b8a4a397fedd Mon Sep 17 00:00:00 2001 From: Denis Titovets Date: Tue, 19 Aug 2025 19:02:13 +0300 Subject: [PATCH 2/3] Make edits based on reviews --- .../UI/ReplayAnalysisSettings.cs | 2 +- osu.Game/Localisation/CommonStrings.cs | 5 +++ osu.Game/Localisation/PlayerLoaderStrings.cs | 30 -------------- .../Localisation/PlayerSettingsStrings.cs | 39 +++++++++++++++++++ .../Screens/Play/BeatmapMetadataDisplay.cs | 4 +- .../Play/PlayerSettings/AudioSettings.cs | 2 +- .../Play/PlayerSettings/InputSettings.cs | 2 +- .../Play/PlayerSettings/PlaybackSettings.cs | 2 +- .../Play/PlayerSettings/VisualSettings.cs | 2 +- 9 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 osu.Game/Localisation/PlayerSettingsStrings.cs diff --git a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs index 69afae4f57..7dc540f430 100644 --- a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs +++ b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs @@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.UI }; public ReplayAnalysisSettings(OsuRulesetConfigManager config) - : base(PlayerLoaderStrings.AnalysisSettingsTitle) + : base(PlayerSettingsStrings.AnalysisSettingsTitle) { this.config = config; } diff --git a/osu.Game/Localisation/CommonStrings.cs b/osu.Game/Localisation/CommonStrings.cs index 9009785f1c..b0ab4b2989 100644 --- a/osu.Game/Localisation/CommonStrings.cs +++ b/osu.Game/Localisation/CommonStrings.cs @@ -194,6 +194,11 @@ namespace osu.Game.Localisation /// public static LocalisableString Details => new TranslatableString(getKey(@"details"), @"Details..."); + /// + /// "Creator" + /// + public static LocalisableString Creator => new TranslatableString(getKey(@"creator"), @"Creator"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Localisation/PlayerLoaderStrings.cs b/osu.Game/Localisation/PlayerLoaderStrings.cs index aa2f9e4b7e..f9d6f80676 100644 --- a/osu.Game/Localisation/PlayerLoaderStrings.cs +++ b/osu.Game/Localisation/PlayerLoaderStrings.cs @@ -43,36 +43,6 @@ Leaderboards may be reset."); public static LocalisableString QualifiedBeatmapDisclaimerContent => new TranslatableString(getKey(@"qualified_beatmap_disclaimer_content"), @"No performance points will be awarded. Leaderboards will be reset when the beatmap is ranked."); - /// - /// "Mapper" - /// - public static LocalisableString ShowInfoMapper => new TranslatableString(getKey(@"show_info_mapper"), @"Mapper"); - - /// - /// "Playback" - /// - public static LocalisableString PlaybackTitle => new TranslatableString(getKey(@"playback_title"), @"Playback"); - - /// - /// "Visual Settings" - /// - public static LocalisableString VisualSettingsTitle => new TranslatableString(getKey(@"visual_settings_title"), @"Visual Settings"); - - /// - /// "Audio Settings" - /// - public static LocalisableString AudioSettingsTitle => new TranslatableString(getKey(@"audio_settings_title"), @"Audio Settings"); - - /// - /// "Input Settings" - /// - public static LocalisableString InputSettingsTitle => new TranslatableString(getKey(@"input_settings_title"), @"Input Settings"); - - /// - /// "Analysis Settings" - /// - public static LocalisableString AnalysisSettingsTitle => new TranslatableString(getKey(@"analysis_settings_title"), @"Analysis Settings"); - private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Localisation/PlayerSettingsStrings.cs b/osu.Game/Localisation/PlayerSettingsStrings.cs new file mode 100644 index 0000000000..79292e1985 --- /dev/null +++ b/osu.Game/Localisation/PlayerSettingsStrings.cs @@ -0,0 +1,39 @@ +// Copyright (c) ppy Pty Ltd . 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 class PlayerSettingsStrings + { + private const string prefix = @"osu.Game.Resources.Localisation.PlayerSettings"; + + /// + /// "Playback" + /// + public static LocalisableString PlaybackTitle => new TranslatableString(getKey(@"playback_title"), @"Playback"); + + /// + /// "Visual Settings" + /// + public static LocalisableString VisualSettingsTitle => new TranslatableString(getKey(@"visual_settings_title"), @"Visual Settings"); + + /// + /// "Audio Settings" + /// + public static LocalisableString AudioSettingsTitle => new TranslatableString(getKey(@"audio_settings_title"), @"Audio Settings"); + + /// + /// "Input Settings" + /// + public static LocalisableString InputSettingsTitle => new TranslatableString(getKey(@"input_settings_title"), @"Input Settings"); + + /// + /// "Analysis Settings" + /// + public static LocalisableString AnalysisSettingsTitle => new TranslatableString(getKey(@"analysis_settings_title"), @"Analysis Settings"); + + private static string getKey(string key) => $@"{prefix}:{key}"; + } +} diff --git a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs index b9f0c0aba1..cf85a043ff 100644 --- a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs +++ b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs @@ -15,11 +15,11 @@ using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; -using osu.Game.Localisation; using osu.Game.Resources.Localisation.Web; using osu.Game.Rulesets.Mods; using osu.Game.Screens.Play.HUD; using osuTK; +using CommonStrings = osu.Game.Localisation.CommonStrings; namespace osu.Game.Screens.Play { @@ -166,7 +166,7 @@ namespace osu.Game.Screens.Play }, new Drawable[] { - new MetadataLineLabel(PlayerLoaderStrings.ShowInfoMapper), + new MetadataLineLabel(CommonStrings.Creator), new MetadataLineInfo(metadata.Author.Username) } } diff --git a/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs b/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs index 66a980e270..f3ed2eb080 100644 --- a/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs @@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private readonly PlayerCheckbox beatmapHitsoundsToggle; public AudioSettings() - : base(PlayerLoaderStrings.AudioSettingsTitle) + : base(PlayerSettingsStrings.AudioSettingsTitle) { Children = new Drawable[] { diff --git a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs index 3243e60c58..86419958cc 100644 --- a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play.PlayerSettings public partial class InputSettings : PlayerSettingsGroup { public InputSettings() - : base(PlayerLoaderStrings.InputSettingsTitle) + : base(PlayerSettingsStrings.InputSettingsTitle) { } diff --git a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs index de69a6f3c1..3b083aba86 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs @@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private IconButton pausePlay = null!; public PlaybackSettings() - : base(PlayerLoaderStrings.PlaybackTitle) + : base(PlayerSettingsStrings.PlaybackTitle) { } diff --git a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs index c7cf25d23a..3c9af92852 100644 --- a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private readonly PlayerCheckbox beatmapColorsToggle; public VisualSettings() - : base(PlayerLoaderStrings.VisualSettingsTitle) + : base(PlayerSettingsStrings.VisualSettingsTitle) { Children = new Drawable[] { From b58f03bc365d8824c3747c48e19a1e6a22972d94 Mon Sep 17 00:00:00 2001 From: Denis Titovets Date: Mon, 13 Oct 2025 10:13:41 +0300 Subject: [PATCH 3/3] Move `PlayerSettingsStrings` & revert "Creator" back to "Mapper" --- .../UI/ReplayAnalysisSettings.cs | 2 +- osu.Game/Localisation/CommonStrings.cs | 4 +- .../PlayerSettingsOverlayStrings.cs | 25 ++++++++++++ .../Localisation/PlayerSettingsStrings.cs | 39 ------------------- .../Screens/Play/BeatmapMetadataDisplay.cs | 2 +- .../Play/PlayerSettings/AudioSettings.cs | 2 +- .../Play/PlayerSettings/InputSettings.cs | 2 +- .../Play/PlayerSettings/PlaybackSettings.cs | 2 +- .../Play/PlayerSettings/VisualSettings.cs | 2 +- 9 files changed, 33 insertions(+), 47 deletions(-) delete mode 100644 osu.Game/Localisation/PlayerSettingsStrings.cs diff --git a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs index 7dc540f430..f05f3aa03a 100644 --- a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs +++ b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs @@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.UI }; public ReplayAnalysisSettings(OsuRulesetConfigManager config) - : base(PlayerSettingsStrings.AnalysisSettingsTitle) + : base(PlayerSettingsOverlayStrings.AnalysisSettingsTitle) { this.config = config; } diff --git a/osu.Game/Localisation/CommonStrings.cs b/osu.Game/Localisation/CommonStrings.cs index b0ab4b2989..c8630f9332 100644 --- a/osu.Game/Localisation/CommonStrings.cs +++ b/osu.Game/Localisation/CommonStrings.cs @@ -195,9 +195,9 @@ namespace osu.Game.Localisation public static LocalisableString Details => new TranslatableString(getKey(@"details"), @"Details..."); /// - /// "Creator" + /// "Mapper" /// - public static LocalisableString Creator => new TranslatableString(getKey(@"creator"), @"Creator"); + public static LocalisableString Mapper => new TranslatableString(getKey(@"mapper"), @"Mapper"); private static string getKey(string key) => $@"{prefix}:{key}"; } diff --git a/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs b/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs index ca37fd27d9..d659f950dc 100644 --- a/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs +++ b/osu.Game/Localisation/PlayerSettingsOverlayStrings.cs @@ -59,6 +59,31 @@ namespace osu.Game.Localisation /// public static LocalisableString DisplayLength => new TranslatableString(getKey(@"display_length"), @"Display length"); + /// + /// "Playback" + /// + public static LocalisableString PlaybackTitle => new TranslatableString(getKey(@"playback_title"), @"Playback"); + + /// + /// "Visual Settings" + /// + public static LocalisableString VisualSettingsTitle => new TranslatableString(getKey(@"visual_settings_title"), @"Visual Settings"); + + /// + /// "Audio Settings" + /// + public static LocalisableString AudioSettingsTitle => new TranslatableString(getKey(@"audio_settings_title"), @"Audio Settings"); + + /// + /// "Input Settings" + /// + public static LocalisableString InputSettingsTitle => new TranslatableString(getKey(@"input_settings_title"), @"Input Settings"); + + /// + /// "Analysis Settings" + /// + public static LocalisableString AnalysisSettingsTitle => new TranslatableString(getKey(@"analysis_settings_title"), @"Analysis Settings"); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Localisation/PlayerSettingsStrings.cs b/osu.Game/Localisation/PlayerSettingsStrings.cs deleted file mode 100644 index 79292e1985..0000000000 --- a/osu.Game/Localisation/PlayerSettingsStrings.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) ppy Pty Ltd . 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 class PlayerSettingsStrings - { - private const string prefix = @"osu.Game.Resources.Localisation.PlayerSettings"; - - /// - /// "Playback" - /// - public static LocalisableString PlaybackTitle => new TranslatableString(getKey(@"playback_title"), @"Playback"); - - /// - /// "Visual Settings" - /// - public static LocalisableString VisualSettingsTitle => new TranslatableString(getKey(@"visual_settings_title"), @"Visual Settings"); - - /// - /// "Audio Settings" - /// - public static LocalisableString AudioSettingsTitle => new TranslatableString(getKey(@"audio_settings_title"), @"Audio Settings"); - - /// - /// "Input Settings" - /// - public static LocalisableString InputSettingsTitle => new TranslatableString(getKey(@"input_settings_title"), @"Input Settings"); - - /// - /// "Analysis Settings" - /// - public static LocalisableString AnalysisSettingsTitle => new TranslatableString(getKey(@"analysis_settings_title"), @"Analysis Settings"); - - private static string getKey(string key) => $@"{prefix}:{key}"; - } -} diff --git a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs index cf85a043ff..23264c4518 100644 --- a/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs +++ b/osu.Game/Screens/Play/BeatmapMetadataDisplay.cs @@ -166,7 +166,7 @@ namespace osu.Game.Screens.Play }, new Drawable[] { - new MetadataLineLabel(CommonStrings.Creator), + new MetadataLineLabel(CommonStrings.Mapper), new MetadataLineInfo(metadata.Author.Username) } } diff --git a/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs b/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs index f3ed2eb080..9ff90f6fef 100644 --- a/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/AudioSettings.cs @@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private readonly PlayerCheckbox beatmapHitsoundsToggle; public AudioSettings() - : base(PlayerSettingsStrings.AudioSettingsTitle) + : base(PlayerSettingsOverlayStrings.AudioSettingsTitle) { Children = new Drawable[] { diff --git a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs index 86419958cc..9c9f31e903 100644 --- a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs @@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play.PlayerSettings public partial class InputSettings : PlayerSettingsGroup { public InputSettings() - : base(PlayerSettingsStrings.InputSettingsTitle) + : base(PlayerSettingsOverlayStrings.InputSettingsTitle) { } diff --git a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs index 3b083aba86..be84d498fa 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs @@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private IconButton pausePlay = null!; public PlaybackSettings() - : base(PlayerSettingsStrings.PlaybackTitle) + : base(PlayerSettingsOverlayStrings.PlaybackTitle) { } diff --git a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs index 3c9af92852..6a09e627c1 100644 --- a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.PlayerSettings private readonly PlayerCheckbox beatmapColorsToggle; public VisualSettings() - : base(PlayerSettingsStrings.VisualSettingsTitle) + : base(PlayerSettingsOverlayStrings.VisualSettingsTitle) { Children = new Drawable[] {