From c8024a3f50d747a2970f8086e9e873db2add96f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 17:08:47 +0000 Subject: [PATCH 1/3] Bump ppy.osu.Game from 2022.821.0 to 2022.901.0 Bumps [ppy.osu.Game](https://github.com/ppy/osu) from 2022.821.0 to 2022.901.0. - [Release notes](https://github.com/ppy/osu/releases) - [Commits](https://github.com/ppy/osu/compare/2022.821.0...2022.901.0) --- updated-dependencies: - dependency-name: ppy.osu.Game dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj b/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj index e4fff9853..613e7d0f4 100644 --- a/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj +++ b/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj @@ -9,7 +9,7 @@ osu.Game.Rulesets.Sentakki - + From 3241955c0e1a5164ddcf282ff1e4e2b4fb357901 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Wed, 31 Aug 2022 19:46:03 +0200 Subject: [PATCH 2/3] Enable localisation of newly localisable strings --- .../Configuration/RingColorOption.cs | 1 - .../Localisation/Mods/SentakkiModMirrorStrings.cs | 2 +- .../Mods/SentakkiModAutoTouch.cs | 3 ++- .../Mods/SentakkiModChallenge.cs | 3 ++- osu.Game.Rulesets.Sentakki/Mods/SentakkiModClassic.cs | 4 +++- .../Mods/SentakkiModExperimental.cs | 10 ++++++---- osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs | 5 +++-- osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs | 8 +++++--- osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs | 6 ++++-- osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs | 3 ++- osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs | 3 ++- 11 files changed, 30 insertions(+), 18 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Configuration/RingColorOption.cs b/osu.Game.Rulesets.Sentakki/Configuration/RingColorOption.cs index 9ac5cd4a4..792c5a0ce 100644 --- a/osu.Game.Rulesets.Sentakki/Configuration/RingColorOption.cs +++ b/osu.Game.Rulesets.Sentakki/Configuration/RingColorOption.cs @@ -1,4 +1,3 @@ -using System.ComponentModel; using osu.Framework.Localisation; using osu.Game.Rulesets.Sentakki.Localisation; diff --git a/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModMirrorStrings.cs b/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModMirrorStrings.cs index f5e1ddbf5..8ec4ddea7 100644 --- a/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModMirrorStrings.cs +++ b/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModMirrorStrings.cs @@ -17,7 +17,7 @@ public static class SentakkiModMirrorStrings /// /// "⇆ Mirror horizontally" /// - public static LocalisableString MirrorHorizonally => new TranslatableString(getKey(@"mirror_horizontally"), @"⇆ Mirror horizontally"); + public static LocalisableString MirrorHorizontally => new TranslatableString(getKey(@"mirror_horizontally"), @"⇆ Mirror horizontally"); public static LocalisableString MirrorHorizontallyDescription => new TranslatableString(getKey(@"mirror_horizontally_description"), @"Mirror entire playfield across the y-axis"); private static string getKey(string key) => $"{prefix}:{key}"; diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs index e093c58f6..1f25632e9 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Graphics; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects.Drawables; @@ -14,7 +15,7 @@ public class SentakkiModAutoTouch : Mod, IApplicableToDrawableHitObject public override string Acronym => "AT"; public override IconUsage? Icon => OsuIcon.PlayStyleTouch; public override ModType Type => ModType.Automation; - public override string Description => @"Focus on the laned notes. Touch notes and Slide bodies will be automatically completed."; + public override LocalisableString Description => @"Focus on the laned notes. Touch notes and Slide bodies will be automatically completed."; public override double ScoreMultiplier => .5f; public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModAutoplay)).ToArray(); diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs index 04ae0072d..855cb2d5c 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json; using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Configuration; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Mods; @@ -18,7 +19,7 @@ namespace osu.Game.Rulesets.Sentakki.Mods public class SentakkiModChallenge : Mod, IApplicableToDrawableRuleset, IApplicableToHealthProcessor { public override string Name => "Challenge"; - public override string Description => "You only get a small margin for errors."; + public override LocalisableString Description => "You only get a small margin for errors."; public override string Acronym => "C"; public override IconUsage? Icon => FontAwesome.Solid.HeartBroken; diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModClassic.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModClassic.cs index eac38a8af..324f65cb3 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModClassic.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModClassic.cs @@ -1,12 +1,14 @@ +using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Sentakki.Beatmaps; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModClassic : ModClassic, IApplicableToBeatmapConverter { - public override string Description => "Remove gameplay elements introduced in maimaiDX, for the Finale purists."; + public override LocalisableString Description => SentakkiModClassicStrings.ModDescription; public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) { diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs index f8f89b54f..2f4003484 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs @@ -1,16 +1,18 @@ using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Configuration; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Sentakki.Beatmaps; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModExperimental : Mod, IApplicableToBeatmapConverter { public override string Name => "Experimental"; - public override string Description => "Some experimental features to be added to future sentakki builds. Autoplay/No-Fail recommended. Replays unsupported."; + public override LocalisableString Description => SentakkiModExperimentalStrings.ModDescription; public override string Acronym => "Ex"; public override IconUsage? Icon => FontAwesome.Solid.Flask; @@ -21,21 +23,21 @@ public class SentakkiModExperimental : Mod, IApplicableToBeatmapConverter public override double ScoreMultiplier => 1.00; - [SettingSource("Twin notes", "Allow more than one note to share the same times (Requires multitouch)")] + [SettingSource(typeof(SentakkiModExperimentalStrings), nameof(SentakkiModExperimentalStrings.TwinNotes), nameof(SentakkiModExperimentalStrings.TwinNotesDescription))] public BindableBool EnableTwinNotes { get; } = new BindableBool { Default = false, Value = false }; - [SettingSource("Twin slides", "Allow more than one slidebody to share the same time and origin (Requires multitouch)")] + [SettingSource(typeof(SentakkiModExperimentalStrings), nameof(SentakkiModExperimentalStrings.TwinSlides), nameof(SentakkiModExperimentalStrings.TwinSlidesDescription))] public BindableBool EnableTwinSlides { get; } = new BindableBool { Default = false, Value = false }; - [SettingSource("Fan slides", "Allow fan slides to occasionally appear (Requires multitouch)")] + [SettingSource(typeof(SentakkiModExperimentalStrings), nameof(SentakkiModExperimentalStrings.FanSlides), nameof(SentakkiModExperimentalStrings.FanSlidesDescription))] public BindableBool EnableSlideFans { get; } = new BindableBool { Default = false, diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs index a1e52edc5..992aa3609 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs @@ -6,11 +6,12 @@ using osu.Framework.Graphics.Rendering; using osu.Framework.Graphics.Rendering.Vertices; using osu.Framework.Graphics.Shaders; -using osu.Framework.Graphics.Textures; +using osu.Framework.Localisation; using osu.Game.Graphics.OpenGL.Vertices; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.Objects; using osu.Game.Rulesets.Sentakki.Objects.Drawables; using osu.Game.Rulesets.Sentakki.UI; @@ -21,7 +22,7 @@ namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModHidden : ModHidden, IApplicableToDrawableRuleset { - public override string Description => "Notes fade out just before you hit them."; + public override LocalisableString Description => SentakkiModHiddenStrings.ModDescription; public override double ScoreMultiplier => 1.06; diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs index 46a4fafba..434a4f49f 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModMirror.cs @@ -1,9 +1,11 @@ using System.Linq; using osu.Framework.Bindables; using osu.Framework.Extensions.IEnumerableExtensions; +using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Configuration; using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.Objects; using osuTK; @@ -12,21 +14,21 @@ namespace osu.Game.Rulesets.Sentakki.Mods public class SentakkiModMirror : Mod, IApplicableAfterBeatmapConversion { public override string Name => "Mirror"; - public override string Description => "Flip the playfield horizontally, vertically, or both!"; + public override LocalisableString Description => SentakkiModMirrorStrings.ModDescription; public override string Acronym => "MR"; public override ModType Type => ModType.Conversion; public override double ScoreMultiplier => 1; public override bool RequiresConfiguration => true; - [SettingSource("⇅ Mirror vertically", "Mirror entire playfield across the x-axis")] + [SettingSource(typeof(SentakkiModMirrorStrings), nameof(SentakkiModMirrorStrings.MirrorVertically), nameof(SentakkiModMirrorStrings.MirrorVerticallyDescription))] public BindableBool VerticalMirrored { get; } = new BindableBool { Default = false, Value = false }; - [SettingSource("⇆ Mirror horizontally", "Mirror entire playfield across the y-axis")] + [SettingSource(typeof(SentakkiModMirrorStrings), nameof(SentakkiModMirrorStrings.MirrorHorizontally), nameof(SentakkiModMirrorStrings.MirrorHorizontallyDescription))] public BindableBool HorizontalMirrored { get; } = new BindableBool { Default = false, diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs index d55c8db7d..56b9fd395 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs @@ -1,7 +1,9 @@ using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Configuration; using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.UI; using osu.Game.Rulesets.UI; @@ -10,7 +12,7 @@ namespace osu.Game.Rulesets.Sentakki.Mods public class SentakkiModSpin : Mod, IUpdatableByPlayfield { public override string Name => "Spin"; - public override string Description => "Replicate the true washing machine experience."; + public override LocalisableString Description => SentakkiModSpinStrings.ModDescription; public override string Acronym => "S"; public override IconUsage? Icon => FontAwesome.Solid.RedoAlt; @@ -18,7 +20,7 @@ public class SentakkiModSpin : Mod, IUpdatableByPlayfield public override double ScoreMultiplier => 1.00; - [SettingSource("Revolution Duration", "The duration in seconds to complete a revolution")] + [SettingSource(typeof(SentakkiModSpinStrings), nameof(SentakkiModSpinStrings.RevolutionDuration), nameof(SentakkiModSpinStrings.RevolutionDurationDescription))] public BindableNumber RevolutionDuration { get; } = new BindableNumber { MinValue = 3, diff --git a/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs b/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs index e63bc208f..bcdaa823a 100644 --- a/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs +++ b/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs @@ -9,6 +9,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Input.Bindings; +using osu.Framework.Localisation; using osu.Framework.Platform; using osu.Game.Beatmaps; using osu.Game.Configuration; @@ -181,7 +182,7 @@ protected override IEnumerable GetValidHitResults() }; } - public override string GetDisplayNameForHitResult(HitResult result) => result.GetDisplayNameForSentakkiResult(); + public override LocalisableString GetDisplayNameForHitResult(HitResult result) => result.GetDisplayNameForSentakkiResult(); public class SentakkiIcon : CompositeDrawable { diff --git a/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs b/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs index 85b88538b..d8d2cbb6b 100644 --- a/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs +++ b/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; +using osu.Framework.Localisation; using osu.Framework.Utils; using osu.Game.Audio; using osu.Game.Beatmaps; @@ -41,7 +42,7 @@ public class SentakkiResumeOverlay : ResumeOverlay private static int currentSupporterIndex; // We don't want the default message - protected override string Message => ""; + protected override LocalisableString Message => ""; private OsuSpriteText messageText; From 6438230436c00f561ee49dcc1f960130565337b6 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Wed, 31 Aug 2022 20:06:02 +0200 Subject: [PATCH 3/3] Actually use localized description in AT and C mods --- osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs | 3 ++- osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs index 1f25632e9..268c4e485 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModAutoTouch.cs @@ -5,6 +5,7 @@ using osu.Game.Graphics; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects.Drawables; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.Objects.Drawables; namespace osu.Game.Rulesets.Sentakki.Mods @@ -15,7 +16,7 @@ public class SentakkiModAutoTouch : Mod, IApplicableToDrawableHitObject public override string Acronym => "AT"; public override IconUsage? Icon => OsuIcon.PlayStyleTouch; public override ModType Type => ModType.Automation; - public override LocalisableString Description => @"Focus on the laned notes. Touch notes and Slide bodies will be automatically completed."; + public override LocalisableString Description => SentakkiModAutoTouchStrings.ModDescription; public override double ScoreMultiplier => .5f; public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModAutoplay)).ToArray(); diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs index 855cb2d5c..678fcf3a9 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModChallenge.cs @@ -9,6 +9,7 @@ using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Sentakki.Judgements; +using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.Objects; using osu.Game.Rulesets.Sentakki.UI; using osu.Game.Rulesets.Sentakki.UI.Components; @@ -19,7 +20,7 @@ namespace osu.Game.Rulesets.Sentakki.Mods public class SentakkiModChallenge : Mod, IApplicableToDrawableRuleset, IApplicableToHealthProcessor { public override string Name => "Challenge"; - public override LocalisableString Description => "You only get a small margin for errors."; + public override LocalisableString Description => SentakkiModChallengeStrings.ModDescription; public override string Acronym => "C"; public override IconUsage? Icon => FontAwesome.Solid.HeartBroken; @@ -49,7 +50,7 @@ public enum Lives [Description("300")] ThreeHundred = 300, } - [SettingSource("Number of Lives", "The number of lives you start with.")] + [SettingSource(typeof(SentakkiModChallengeStrings), nameof(SentakkiModChallengeStrings.NumberOfLives), nameof(SentakkiModChallengeStrings.NumberOfLivesDescription))] public Bindable LiveSetting { get; } = new Bindable { Default = Lives.Fifty,