From ffbc72123c5d7f233f876c97fbd78fc32f5c9ded Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 10 Mar 2024 21:37:00 +0800 Subject: [PATCH 1/5] Romaji -> Romajisation in the generator test. --- .../Generator/Lyrics/RubyTags/RubyTagGeneratorSelectorTest.cs | 2 +- .../Generator/Lyrics/TimeTags/Ja/JaTimeTagGeneratorTest.cs | 2 +- .../Generator/Lyrics/TimeTags/TimeTagGeneratorSelectorTest.cs | 2 +- .../Generator/Lyrics/TimeTags/Zh/ZhTimeTagGeneratorTest.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/Generator/Lyrics/RubyTags/RubyTagGeneratorSelectorTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/Generator/Lyrics/RubyTags/RubyTagGeneratorSelectorTest.cs index 95445da0d..176460f3d 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/Generator/Lyrics/RubyTags/RubyTagGeneratorSelectorTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/Generator/Lyrics/RubyTags/RubyTagGeneratorSelectorTest.cs @@ -14,7 +14,7 @@ public class RubyTagGeneratorSelectorTest : BaseLyricGeneratorSelectorTest Date: Sun, 10 Mar 2024 21:43:14 +0800 Subject: [PATCH 2/5] RomajiName -> Romanisation in the singer class. --- .../Graphics/TestSceneSingerToolTip.cs | 10 +++--- .../Ranking/TestSceneBeatmapMetadataGraph.cs | 2 +- .../Edit/Beatmap/TestSceneSingerScreen.cs | 6 ++-- .../Beatmaps/Metadatas/Singer.cs | 8 ++--- .../Graphics/Cursor/SingerToolTip.cs | 32 +++++++++---------- .../Singers/Detail/MetadataSection.cs | 4 +-- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Graphics/TestSceneSingerToolTip.cs b/osu.Game.Rulesets.Karaoke.Tests/Graphics/TestSceneSingerToolTip.cs index 3eb8ef088..d36fc182f 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Graphics/TestSceneSingerToolTip.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Graphics/TestSceneSingerToolTip.cs @@ -50,16 +50,16 @@ public void TestDisplayToolTip() singer.EnglishName = "Hatsune Miku"; }); - setTooltip("Test singer with romaji name", singer => + setTooltip("Test singer with romanisation", singer => { - singer.Name = "Singer with Romaji name"; - singer.RomajiName = "Hatsune Miku"; + singer.Name = "Singer with romanisation"; + singer.Romanisation = "Hatsune Miku"; }); setTooltip("Test singer with large context", singer => { - singer.Name = "Singer with Romaji name large large large large large large large large large"; - singer.RomajiName = "Hatsune Miku large large large large large large large large large"; + singer.Name = "Singer with romanisation large large large large large large large large large"; + singer.Romanisation = "Hatsune Miku large large large large large large large large large"; singer.EnglishName = "Hatsune Miku large large large large large large large large large"; singer.Description = "International superstar vocaloid Hatsune Miku on Sept 9 assumed her new position as Coronavirus Countermeasure Supporter in the Office for Novel Coronavirus Disease Control of the Japanese government’s Cabinet Secretariat."; diff --git a/osu.Game.Rulesets.Karaoke.Tests/Ranking/TestSceneBeatmapMetadataGraph.cs b/osu.Game.Rulesets.Karaoke.Tests/Ranking/TestSceneBeatmapMetadataGraph.cs index 17ca76107..00922a256 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Ranking/TestSceneBeatmapMetadataGraph.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Ranking/TestSceneBeatmapMetadataGraph.cs @@ -59,7 +59,7 @@ private static SingerInfo createSingerInfo() singerInfo.AddSinger(s => { s.Name = $"Singer{singerIndex}"; - s.RomajiName = $"[Romaji]Singer{singerIndex}"; + s.Romanisation = $"[Romanisation]Singer{singerIndex}"; s.EnglishName = $"[English]Singer{singerIndex}"; }); } diff --git a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneSingerScreen.cs b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneSingerScreen.cs index 569107aa6..93f6992f4 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneSingerScreen.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Screens/Edit/Beatmap/TestSceneSingerScreen.cs @@ -31,7 +31,7 @@ protected override KaraokeBeatmap CreateBeatmap() { s.Order = 1; s.Name = "初音ミク"; - s.RomajiName = "Hatsune Miku"; + s.Romanisation = "Hatsune Miku"; s.EnglishName = "Miku"; s.Description = "International superstar vocaloid Hatsune Miku."; s.Hue = 189 / 360f; @@ -41,7 +41,7 @@ protected override KaraokeBeatmap CreateBeatmap() { s.Order = 2; s.Name = "ハク"; - s.RomajiName = "haku"; + s.Romanisation = "haku"; s.EnglishName = "andy840119"; s.Description = "Creator of this ruleset."; s.Hue = 46 / 360f; @@ -51,7 +51,7 @@ protected override KaraokeBeatmap CreateBeatmap() { s.Order = 3; s.Name = "ゴミパソコン"; - s.RomajiName = "gomi-pasokonn"; + s.Romanisation = "gomi-pasokonn"; s.EnglishName = "Miku"; s.Description = "My fucking slow desktop."; s.Hue = 290 / 360f; diff --git a/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/Singer.cs b/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/Singer.cs index 90f87eaac..d6cacbee8 100644 --- a/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/Singer.cs +++ b/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/Singer.cs @@ -56,12 +56,12 @@ public string Name } [JsonIgnore] - public readonly Bindable RomajiNameBindable = new(); + public readonly Bindable RomanisationBindable = new(); - public string RomajiName + public string Romanisation { - get => RomajiNameBindable.Value; - set => RomajiNameBindable.Value = value; + get => RomanisationBindable.Value; + set => RomanisationBindable.Value = value; } [JsonIgnore] diff --git a/osu.Game.Rulesets.Karaoke/Graphics/Cursor/SingerToolTip.cs b/osu.Game.Rulesets.Karaoke/Graphics/Cursor/SingerToolTip.cs index 7024b6e86..9b69c8059 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/Cursor/SingerToolTip.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/Cursor/SingerToolTip.cs @@ -24,7 +24,7 @@ public partial class SingerToolTip : BackgroundToolTip private const int sub_text_size = 12; private readonly IBindable bindableName = new Bindable(); - private readonly IBindable bindableRomajiName = new Bindable(); + private readonly IBindable bindableRomanisation = new Bindable(); private readonly IBindable bindableEnglishName = new Bindable(); private readonly IBindable bindableDescription = new Bindable(); @@ -32,10 +32,10 @@ public partial class SingerToolTip : BackgroundToolTip private KaraokeBeatmapResourcesProvider karaokeBeatmapResourcesProvider; private readonly DrawableSingerAvatar avatar; - private readonly OsuSpriteText singerName; - private readonly OsuSpriteText singerEnglishName; - private readonly OsuSpriteText singerRomajiName; - private readonly OsuSpriteText singerDescription; + private readonly OsuSpriteText name; + private readonly OsuSpriteText englishName; + private readonly OsuSpriteText romanisation; + private readonly OsuSpriteText description; public SingerToolTip() { @@ -85,23 +85,23 @@ public SingerToolTip() Spacing = new Vector2(1), Children = new[] { - singerName = new TruncatingSpriteText + name = new TruncatingSpriteText { Name = "Singer name", Font = OsuFont.GetFont(weight: FontWeight.Bold, size: main_text_size), RelativeSizeAxes = Axes.X, ShowTooltip = false, }, - singerRomajiName = new TruncatingSpriteText + romanisation = new TruncatingSpriteText { - Name = "Romaji name", + Name = "Romanisation", Font = OsuFont.GetFont(weight: FontWeight.Bold, size: sub_text_size), RelativeSizeAxes = Axes.X, ShowTooltip = false, }, }, }, - singerEnglishName = new TruncatingSpriteText + englishName = new TruncatingSpriteText { Name = "English name", Anchor = Anchor.BottomLeft, @@ -115,7 +115,7 @@ public SingerToolTip() }, }, }, - singerDescription = new OsuSpriteText + description = new OsuSpriteText { RelativeSizeAxes = Axes.X, AllowMultiline = true, @@ -126,10 +126,10 @@ public SingerToolTip() }, }; - bindableName.BindValueChanged(e => singerName.Text = e.NewValue, true); - bindableRomajiName.BindValueChanged(e => singerRomajiName.Text = string.IsNullOrEmpty(e.NewValue) ? string.Empty : $"({e.NewValue})", true); - bindableEnglishName.BindValueChanged(e => singerEnglishName.Text = e.NewValue, true); - bindableDescription.BindValueChanged(e => singerDescription.Text = string.IsNullOrEmpty(e.NewValue) ? "" : e.NewValue, true); + bindableName.BindValueChanged(e => name.Text = e.NewValue, true); + bindableRomanisation.BindValueChanged(e => romanisation.Text = string.IsNullOrEmpty(e.NewValue) ? string.Empty : $"({e.NewValue})", true); + bindableEnglishName.BindValueChanged(e => englishName.Text = e.NewValue, true); + bindableDescription.BindValueChanged(e => description.Text = string.IsNullOrEmpty(e.NewValue) ? "" : e.NewValue, true); } private ISinger? lastSinger; @@ -148,12 +148,12 @@ public override void SetContent(ISinger singer) return; bindableName.UnbindBindings(); - bindableRomajiName.UnbindBindings(); + bindableRomanisation.UnbindBindings(); bindableEnglishName.UnbindBindings(); bindableDescription.UnbindBindings(); bindableName.BindTo(s.NameBindable); - bindableRomajiName.BindTo(s.RomajiNameBindable); + bindableRomanisation.BindTo(s.RomanisationBindable); bindableEnglishName.BindTo(s.EnglishNameBindable); bindableDescription.BindTo(s.DescriptionBindable); } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/Detail/MetadataSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/Detail/MetadataSection.cs index 9fdaa56d3..fb843f854 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/Detail/MetadataSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/Detail/MetadataSection.cs @@ -24,8 +24,8 @@ public MetadataSection(Singer singer) }, new LabelledTextBox { - Label = "Romaji name", - Current = singer.RomajiNameBindable, + Label = "Romanisation", + Current = singer.RomanisationBindable, TabbableContentContainer = this, }, new LabelledTextBox From 1a2a49845595126d847169d698e497f6d84d6029 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 10 Mar 2024 21:45:34 +0800 Subject: [PATCH 3/5] JaRomajiGeneratorConfig -> JaRomanisationGeneratorConfig. --- .../KaraokeRulesetEditGeneratorConfigManager.cs | 8 ++++---- .../Romanisation/RomanisationAutoGenerateSection.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetEditGeneratorConfigManager.cs b/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetEditGeneratorConfigManager.cs index b7508299f..32e9a8348 100644 --- a/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetEditGeneratorConfigManager.cs +++ b/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetEditGeneratorConfigManager.cs @@ -49,7 +49,7 @@ protected override void InitialiseDefaults() SetDefault(); SetDefault(); - // Romaji generator + // Romanisation generator SetDefault(); // Note generator @@ -79,7 +79,7 @@ protected static KaraokeRulesetEditGeneratorSetting GetSettingByType() = Type t when t == typeof(JaRubyTagGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaRubyTagGeneratorConfig, Type t when t == typeof(JaTimeTagGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaTimeTagGeneratorConfig, Type t when t == typeof(ZhTimeTagGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.ZhTimeTagGeneratorConfig, - Type t when t == typeof(JaRomanisationGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaRomajiGeneratorConfig, + Type t when t == typeof(JaRomanisationGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.JaRomanisationGeneratorConfig, Type t when t == typeof(NoteGeneratorConfig) => KaraokeRulesetEditGeneratorSetting.NoteGeneratorConfig, _ => throw new NotSupportedException(), }; @@ -129,8 +129,8 @@ public enum KaraokeRulesetEditGeneratorSetting JaTimeTagGeneratorConfig, ZhTimeTagGeneratorConfig, - // Romaji generator. - JaRomajiGeneratorConfig, + // Romanisation generator. + JaRomanisationGeneratorConfig, // Note generator NoteGeneratorConfig, diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romanisation/RomanisationAutoGenerateSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romanisation/RomanisationAutoGenerateSection.cs index e63648df5..0beddcb64 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romanisation/RomanisationAutoGenerateSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/Romanisation/RomanisationAutoGenerateSection.cs @@ -57,13 +57,13 @@ protected partial class RomanisationAutoGenerateConfigButton : MultiConfigButton { protected override IEnumerable AvailableSettings => new[] { - KaraokeRulesetEditGeneratorSetting.JaRomajiGeneratorConfig, + KaraokeRulesetEditGeneratorSetting.JaRomanisationGeneratorConfig, }; protected override string GetDisplayName(KaraokeRulesetEditGeneratorSetting setting) => setting switch { - KaraokeRulesetEditGeneratorSetting.JaRomajiGeneratorConfig => "Japanese", + KaraokeRulesetEditGeneratorSetting.JaRomanisationGeneratorConfig => "Japanese", _ => throw new ArgumentOutOfRangeException(nameof(setting)), }; } From 389b3854d86807da885aede0e75f74ad3b784b16 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 10 Mar 2024 21:50:58 +0800 Subject: [PATCH 4/5] Romaji -> Romajisation in the KaraokeRulesetConfigManager. --- .../Configuration/KaraokeRulesetConfigManager.cs | 10 +++++----- .../Objects/Drawables/DrawableLyric.cs | 12 ++++++------ .../Settings/Previews/Gameplay/LyricPreview.cs | 6 +++--- .../Settings/Sections/Graphics/LyricFontSettings.cs | 8 ++++---- .../Skinning/Elements/LyricFontInfo.cs | 4 ++-- .../UI/KaraokePlayfieldAdjustmentContainer.cs | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetConfigManager.cs b/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetConfigManager.cs index e33d8b00e..93dbe84ae 100644 --- a/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetConfigManager.cs +++ b/osu.Game.Rulesets.Karaoke/Configuration/KaraokeRulesetConfigManager.cs @@ -63,8 +63,8 @@ protected override void InitialiseDefaults() SetDefault(KaraokeRulesetSetting.MainFont, new FontUsage("Torus", 48, "Bold"), 48f, 48f); SetDefault(KaraokeRulesetSetting.RubyFont, new FontUsage("Torus", 20, "Bold"), 8f, 48f); SetDefault(KaraokeRulesetSetting.RubyMargin, 5, 0, 20); - SetDefault(KaraokeRulesetSetting.RomajiFont, new FontUsage("Torus", 20, "Bold"), 8f, 48f); - SetDefault(KaraokeRulesetSetting.RomajiMargin, 0, 0, 20); + SetDefault(KaraokeRulesetSetting.RomanisationFont, new FontUsage("Torus", 20, "Bold"), 8f, 48f); + SetDefault(KaraokeRulesetSetting.RomanisationMargin, 0, 0, 20); SetDefault(KaraokeRulesetSetting.ForceUseDefaultFont, false); SetDefault(KaraokeRulesetSetting.TranslateFont, new FontUsage("Torus", 18, "Bold"), 10f, 48f); SetDefault(KaraokeRulesetSetting.ForceUseDefaultTranslateFont, false); @@ -83,7 +83,7 @@ protected override void AddBindable(KaraokeRulesetSetting lookup, Bin case KaraokeRulesetSetting.MainFont: case KaraokeRulesetSetting.RubyFont: - case KaraokeRulesetSetting.RomajiFont: + case KaraokeRulesetSetting.RomanisationFont: case KaraokeRulesetSetting.TranslateFont: case KaraokeRulesetSetting.NoteFont: base.AddBindable(lookup, new BindableFontUsage(TypeUtils.ChangeType(bindable.Value))); @@ -164,8 +164,8 @@ public enum KaraokeRulesetSetting MainFont, RubyFont, RubyMargin, - RomajiFont, - RomajiMargin, + RomanisationFont, + RomanisationMargin, ForceUseDefaultFont, TranslateFont, ForceUseDefaultTranslateFont, diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs index d21f55bff..13c4a8307 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs @@ -38,8 +38,8 @@ public partial class DrawableLyric : DrawableKaraokeHitObject private readonly Bindable mainFontUsageBindable = new(); private readonly Bindable rubyFontUsageBindable = new(); private readonly Bindable rubyMarginBindable = new(); - private readonly Bindable romajiFontUsageBindable = new(); - private readonly Bindable romajiMarginBindable = new(); + private readonly Bindable romanisationFontUsageBindable = new(); + private readonly Bindable romanisationMarginBindable = new(); private readonly Bindable translateFontUsageBindable = new(); private readonly IBindableDictionary singersBindable = new BindableDictionary(); @@ -102,16 +102,16 @@ private void load([CanBeNull] KaraokeSessionStatics session) config.BindWith(KaraokeRulesetSetting.MainFont, mainFontUsageBindable); config.BindWith(KaraokeRulesetSetting.RubyFont, rubyFontUsageBindable); config.BindWith(KaraokeRulesetSetting.RubyMargin, rubyMarginBindable); - config.BindWith(KaraokeRulesetSetting.RomajiFont, romajiFontUsageBindable); - config.BindWith(KaraokeRulesetSetting.RomajiMargin, romajiMarginBindable); + config.BindWith(KaraokeRulesetSetting.RomanisationFont, romanisationFontUsageBindable); + config.BindWith(KaraokeRulesetSetting.RomanisationMargin, romanisationMarginBindable); config.BindWith(KaraokeRulesetSetting.TranslateFont, translateFontUsageBindable); } mainFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); rubyFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); rubyMarginBindable.BindValueChanged(_ => updateLyricFontInfo()); - romajiFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); - romajiMarginBindable.BindValueChanged(_ => updateLyricFontInfo()); + romanisationFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); + romanisationMarginBindable.BindValueChanged(_ => updateLyricFontInfo()); translateFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); // property in hitobject. diff --git a/osu.Game.Rulesets.Karaoke/Screens/Settings/Previews/Gameplay/LyricPreview.cs b/osu.Game.Rulesets.Karaoke/Screens/Settings/Previews/Gameplay/LyricPreview.cs index 0a143c00c..a69b4f01d 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Settings/Previews/Gameplay/LyricPreview.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Settings/Previews/Gameplay/LyricPreview.cs @@ -24,7 +24,7 @@ public partial class LyricPreview : SettingsSubsectionPreview { private readonly Bindable mainFont = new(); private readonly Bindable rubyFont = new(); - private readonly Bindable romajiFont = new(); + private readonly Bindable romanisationFont = new(); private readonly Bindable translateFont = new(); private readonly Bindable preferLanguage = new(); @@ -60,7 +60,7 @@ public LyricPreview() { addFont(e.NewValue); }); - romajiFont.BindValueChanged(e => + romanisationFont.BindValueChanged(e => { addFont(e.NewValue); }); @@ -94,7 +94,7 @@ private void load(FontManager fontManager, IRenderer renderer, KaraokeRulesetCon // fonts config.BindWith(KaraokeRulesetSetting.MainFont, mainFont); config.BindWith(KaraokeRulesetSetting.RubyFont, rubyFont); - config.BindWith(KaraokeRulesetSetting.RomajiFont, romajiFont); + config.BindWith(KaraokeRulesetSetting.RomanisationFont, romanisationFont); config.BindWith(KaraokeRulesetSetting.TranslateFont, translateFont); config.BindWith(KaraokeRulesetSetting.PreferLanguage, preferLanguage); } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Settings/Sections/Graphics/LyricFontSettings.cs b/osu.Game.Rulesets.Karaoke/Screens/Settings/Sections/Graphics/LyricFontSettings.cs index cc3204eff..752f86327 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Settings/Sections/Graphics/LyricFontSettings.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Settings/Sections/Graphics/LyricFontSettings.cs @@ -41,13 +41,13 @@ private void load() }, new SettingsFont { - LabelText = "Default romaji font", - Current = Config.GetBindable(KaraokeRulesetSetting.RomajiFont), + LabelText = "Default romanisation font", + Current = Config.GetBindable(KaraokeRulesetSetting.RomanisationFont), }, new SettingsSlider { - LabelText = "Romaji margin", - Current = Config.GetBindable(KaraokeRulesetSetting.RomajiMargin), + LabelText = "Romanisation margin", + Current = Config.GetBindable(KaraokeRulesetSetting.RomanisationMargin), KeyboardStep = 1, }, new SettingsCheckbox diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs index 945ddf5dd..9ae4676ef 100644 --- a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs +++ b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs @@ -98,7 +98,7 @@ public void ApplyTo(Drawable d) // Apply text font info l.Font = getFont(KaraokeRulesetSetting.MainFont, MainTextFont); l.RubyFont = getFont(KaraokeRulesetSetting.RubyFont, RubyTextFont); - l.RomajiFont = getFont(KaraokeRulesetSetting.RomajiFont, RomajiTextFont); + l.RomajiFont = getFont(KaraokeRulesetSetting.RomanisationFont, RomajiTextFont); // Layout to text l.KaraokeTextSmartHorizon = SmartHorizon; @@ -138,7 +138,7 @@ bool forceUseDefaultFont() { case KaraokeRulesetSetting.MainFont: case KaraokeRulesetSetting.RubyFont: - case KaraokeRulesetSetting.RomajiFont: + case KaraokeRulesetSetting.RomanisationFont: return config?.Get(KaraokeRulesetSetting.ForceUseDefaultFont) ?? false; case KaraokeRulesetSetting.TranslateFont: diff --git a/osu.Game.Rulesets.Karaoke/UI/KaraokePlayfieldAdjustmentContainer.cs b/osu.Game.Rulesets.Karaoke/UI/KaraokePlayfieldAdjustmentContainer.cs index 17a2f90ab..07929458c 100644 --- a/osu.Game.Rulesets.Karaoke/UI/KaraokePlayfieldAdjustmentContainer.cs +++ b/osu.Game.Rulesets.Karaoke/UI/KaraokePlayfieldAdjustmentContainer.cs @@ -32,7 +32,7 @@ private void load(FontManager fontManager, IRenderer renderer, KaraokeRulesetCon { manager.Get(KaraokeRulesetSetting.MainFont), manager.Get(KaraokeRulesetSetting.RubyFont), - manager.Get(KaraokeRulesetSetting.RomajiFont), + manager.Get(KaraokeRulesetSetting.RomanisationFont), manager.Get(KaraokeRulesetSetting.TranslateFont), manager.Get(KaraokeRulesetSetting.NoteFont), }; From 7e8fd49ce884e1a3257f9a1ccedd1f39f263f011 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 10 Mar 2024 22:59:09 +0800 Subject: [PATCH 5/5] Romaji -> Romanisation in the LyricFontInfo. --- .../KaraokeSkinElementConverterTest.cs | 4 +-- .../Resources/special-skin/default.json | 2 +- .../Resources/Skin/Default/default.json | 2 +- .../Lyrics/PreviewKaraokeSpriteText.cs | 2 +- .../Edit/Beatmaps/Lyrics/LyricEditorSkin.cs | 4 +-- .../Screens/Skin/Config/IntervalSection.cs | 4 +-- .../Screens/Skin/Config/RubyRomajiSection.cs | 8 ++--- .../Skinning/Elements/LyricFontInfo.cs | 32 +++++++++---------- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs index df769615f..446f086f7 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs @@ -28,7 +28,7 @@ public void TestLyricConfigSerializer() var lyricConfig = LyricFontInfo.CreateDefault(); const string expected = - "{\"$type\":0,\"name\":\"Default\",\"smart_horizon\":2,\"lyrics_interval\":4,\"ruby_interval\":2,\"romaji_interval\":2,\"ruby_alignment\":2,\"romaji_alignment\":2,\"ruby_margin\":4,\"romaji_margin\":4,\"main_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\",\"size\":48.0},\"ruby_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"},\"romaji_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"}}"; + "{\"$type\":0,\"name\":\"Default\",\"smart_horizon\":2,\"lyrics_interval\":4,\"ruby_interval\":2,\"romanisation_interval\":2,\"ruby_alignment\":2,\"romanisation_alignment\":2,\"ruby_margin\":4,\"romanisation_margin\":4,\"main_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\",\"size\":48.0},\"ruby_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"},\"romanisation_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"}}"; string actual = JsonConvert.SerializeObject(lyricConfig, CreateSettings()); Assert.AreEqual(expected, actual); } @@ -37,7 +37,7 @@ public void TestLyricConfigSerializer() public void TestLyricConfigDeserialize() { const string json = - "{\"$type\":0,\"name\":\"Default\",\"smart_horizon\":2,\"lyrics_interval\":4,\"ruby_interval\":2,\"romaji_interval\":2,\"ruby_alignment\":2,\"romaji_alignment\":2,\"ruby_margin\":4,\"romaji_margin\":4,\"main_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\",\"size\":48.0},\"ruby_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"},\"romaji_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"}}"; + "{\"$type\":0,\"name\":\"Default\",\"smart_horizon\":2,\"lyrics_interval\":4,\"ruby_interval\":2,\"romanisation_interval\":2,\"ruby_alignment\":2,\"romanisation_alignment\":2,\"ruby_margin\":4,\"romanisation_margin\":4,\"main_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\",\"size\":48.0},\"ruby_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"},\"romanisation_text_font\":{\"family\":\"Torus\",\"weight\":\"Bold\"}}"; var expected = LyricFontInfo.CreateDefault(); var actual = (LyricFontInfo)JsonConvert.DeserializeObject(json, CreateSettings())!; diff --git a/osu.Game.Rulesets.Karaoke.Tests/Resources/special-skin/default.json b/osu.Game.Rulesets.Karaoke.Tests/Resources/special-skin/default.json index c044b36b1..1d5e56a87 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Resources/special-skin/default.json +++ b/osu.Game.Rulesets.Karaoke.Tests/Resources/special-skin/default.json @@ -15,7 +15,7 @@ "family": "Torus", "weight": "Bold" }, - "romaji_text_font": { + "romanisation_text_font": { "family": "Torus", "weight": "Bold" } diff --git a/osu.Game.Rulesets.Karaoke/Resources/Skin/Default/default.json b/osu.Game.Rulesets.Karaoke/Resources/Skin/Default/default.json index c044b36b1..1d5e56a87 100644 --- a/osu.Game.Rulesets.Karaoke/Resources/Skin/Default/default.json +++ b/osu.Game.Rulesets.Karaoke/Resources/Skin/Default/default.json @@ -15,7 +15,7 @@ "family": "Torus", "weight": "Bold" }, - "romaji_text_font": { + "romanisation_text_font": { "family": "Torus", "weight": "Bold" } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/PreviewKaraokeSpriteText.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/PreviewKaraokeSpriteText.cs index c1864d6c4..17d038955 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/PreviewKaraokeSpriteText.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/PreviewKaraokeSpriteText.cs @@ -225,7 +225,7 @@ private void load(ISkinSource skin, ShaderManager? shaderManager) // Apply text font info var lyricFont = newConfig.MainTextFont; var rubyFont = newConfig.RubyTextFont; - var romajiFont = newConfig.RomajiTextFont; + var romajiFont = newConfig.RomanisationTextFont; Font = getFont(lyricFont.Size); RubyFont = getFont(rubyFont.Size); diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorSkin.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorSkin.cs index fe3419ec0..2bc3b1074 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorSkin.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/LyricEditorSkin.cs @@ -85,8 +85,8 @@ public float FontSize = multipleSize(LyricFontInfo.MainTextFont, changePercentage); LyricFontInfo.RubyTextFont = multipleSize(LyricFontInfo.RubyTextFont, changePercentage); - LyricFontInfo.RomajiTextFont - = multipleSize(LyricFontInfo.RomajiTextFont, changePercentage); + LyricFontInfo.RomanisationTextFont + = multipleSize(LyricFontInfo.RomanisationTextFont, changePercentage); // todo: change size might not working now. // DefaultElement[ElementType.LyricConfig].TriggerChange(); diff --git a/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/IntervalSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/IntervalSection.cs index ac6b7dc20..fe45ea69c 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/IntervalSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/IntervalSection.cs @@ -67,7 +67,7 @@ private void load(LyricFontInfoManager lyricFontInfoManager) var lyricFontInfo = e.NewValue; applyCurrent(lyricIntervalSliderBar.Current, lyricFontInfo.LyricsInterval); applyCurrent(rubyIntervalSliderBar.Current, lyricFontInfo.RubyInterval); - applyCurrent(romajiIntervalSliderBar.Current, lyricFontInfo.RomajiInterval); + applyCurrent(romajiIntervalSliderBar.Current, lyricFontInfo.RomanisationInterval); static void applyCurrent(Bindable bindable, T value) => bindable.Value = bindable.Default = value; @@ -75,6 +75,6 @@ static void applyCurrent(Bindable bindable, T value) lyricIntervalSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.LyricsInterval = x.NewValue)); rubyIntervalSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RubyInterval = x.NewValue)); - romajiIntervalSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RomajiInterval = x.NewValue)); + romajiIntervalSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RomanisationInterval = x.NewValue)); } } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/RubyRomajiSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/RubyRomajiSection.cs index f2c240642..39682fff5 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/RubyRomajiSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Skin/Config/RubyRomajiSection.cs @@ -68,17 +68,17 @@ private void load(LyricFontInfoManager lyricFontInfoManager) { var lyricFontInfo = e.NewValue; applyCurrent(rubyAlignmentDropdown.Current, lyricFontInfo.RubyAlignment); - applyCurrent(romajiAlignmentDropdown.Current, lyricFontInfo.RomajiAlignment); + applyCurrent(romajiAlignmentDropdown.Current, lyricFontInfo.RomanisationAlignment); applyCurrent(rubyMarginSliderBar.Current, lyricFontInfo.RubyMargin); - applyCurrent(romajiMarginSliderBar.Current, lyricFontInfo.RomajiMargin); + applyCurrent(romajiMarginSliderBar.Current, lyricFontInfo.RomanisationMargin); static void applyCurrent(Bindable bindable, T value) => bindable.Value = bindable.Default = value; }, true); rubyAlignmentDropdown.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RubyAlignment = x.NewValue)); - romajiAlignmentDropdown.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RomajiAlignment = x.NewValue)); + romajiAlignmentDropdown.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RomanisationAlignment = x.NewValue)); rubyMarginSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RubyMargin = x.NewValue)); - romajiMarginSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RomajiMargin = x.NewValue)); + romajiMarginSliderBar.Current.BindValueChanged(x => lyricFontInfoManager.ApplyCurrentLyricFontInfoChange(l => l.RomanisationMargin = x.NewValue)); } } diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs index 9ae4676ef..d1ca46863 100644 --- a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs +++ b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs @@ -19,14 +19,14 @@ public class LyricFontInfo : IKaraokeSkinElement SmartHorizon = KaraokeTextSmartHorizon.Multi, LyricsInterval = 4, RubyInterval = 2, - RomajiInterval = 2, + RomanisationInterval = 2, RubyAlignment = LyricTextAlignment.EqualSpace, - RomajiAlignment = LyricTextAlignment.EqualSpace, + RomanisationAlignment = LyricTextAlignment.EqualSpace, RubyMargin = 4, - RomajiMargin = 4, + RomanisationMargin = 4, MainTextFont = new FontUsage("Torus", 48, "Bold"), RubyTextFont = new FontUsage("Torus", 20, "Bold"), - RomajiTextFont = new FontUsage("Torus", 20, "Bold"), + RomanisationTextFont = new FontUsage("Torus", 20, "Bold"), }; public int ID { get; set; } @@ -49,9 +49,9 @@ public class LyricFontInfo : IKaraokeSkinElement public int RubyInterval { get; set; } /// - /// Interval between lyric romaji + /// Interval between lyric romanisation /// - public int RomajiInterval { get; set; } + public int RomanisationInterval { get; set; } /// /// Ruby position alignment @@ -61,7 +61,7 @@ public class LyricFontInfo : IKaraokeSkinElement /// /// Ruby position alignment /// - public LyricTextAlignment RomajiAlignment { get; set; } = LyricTextAlignment.Auto; + public LyricTextAlignment RomanisationAlignment { get; set; } = LyricTextAlignment.Auto; /// /// Interval between lyric text and ruby @@ -69,9 +69,9 @@ public class LyricFontInfo : IKaraokeSkinElement public int RubyMargin { get; set; } /// - /// (Additional) Interval between lyric text and romaji + /// (Additional) Interval between lyric text and romanisation. /// - public int RomajiMargin { get; set; } + public int RomanisationMargin { get; set; } /// /// Main text font @@ -84,9 +84,9 @@ public class LyricFontInfo : IKaraokeSkinElement public FontUsage RubyTextFont { get; set; } = new("Torus", 20, "Bold"); /// - /// Romaji text font + /// Romanisation text font /// - public FontUsage RomajiTextFont { get; set; } = new("Torus", 20, "Bold"); + public FontUsage RomanisationTextFont { get; set; } = new("Torus", 20, "Bold"); public void ApplyTo(Drawable d) { @@ -98,7 +98,7 @@ public void ApplyTo(Drawable d) // Apply text font info l.Font = getFont(KaraokeRulesetSetting.MainFont, MainTextFont); l.RubyFont = getFont(KaraokeRulesetSetting.RubyFont, RubyTextFont); - l.RomajiFont = getFont(KaraokeRulesetSetting.RomanisationFont, RomajiTextFont); + l.RomajiFont = getFont(KaraokeRulesetSetting.RomanisationFont, RomanisationTextFont); // Layout to text l.KaraokeTextSmartHorizon = SmartHorizon; @@ -109,10 +109,10 @@ public void ApplyTo(Drawable d) l.RubyAlignment = RubyAlignment; l.RubyMargin = RubyMargin; - // Romaji - l.RomajiSpacing = new Vector2(RomajiInterval, l.RomajiSpacing.Y); - l.RomajiAlignment = RomajiAlignment; - l.RomajiMargin = RomajiMargin; + // Romanisation + l.RomajiSpacing = new Vector2(RomanisationInterval, l.RomajiSpacing.Y); + l.RomajiAlignment = RomanisationAlignment; + l.RomajiMargin = RomanisationMargin; }); // Apply translate font.