diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Beatmaps/BeatmapLanguagesChangeHandlerTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Beatmaps/BeatmapTranslationsChangeHandlerTest.cs similarity index 96% rename from osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Beatmaps/BeatmapLanguagesChangeHandlerTest.cs rename to osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Beatmaps/BeatmapTranslationsChangeHandlerTest.cs index e8f49d21e..c2a6f9a53 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Beatmaps/BeatmapLanguagesChangeHandlerTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Beatmaps/BeatmapTranslationsChangeHandlerTest.cs @@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Karaoke.Tests.Editor.ChangeHandlers.Beatmaps; -public partial class BeatmapLanguagesChangeHandlerTest : BaseChangeHandlerTest +public partial class BeatmapTranslationsChangeHandlerTest : BaseChangeHandlerTest { [Test] public void TestAdd() diff --git a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/BeatmapLanguagesChangeHandler.cs b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/BeatmapTranslationsChangeHandler.cs similarity index 88% rename from osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/BeatmapLanguagesChangeHandler.cs rename to osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/BeatmapTranslationsChangeHandler.cs index 692c7927a..ac547717b 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/BeatmapLanguagesChangeHandler.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/BeatmapTranslationsChangeHandler.cs @@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Beatmaps; -public partial class BeatmapLanguagesChangeHandler : BeatmapListPropertyChangeHandler, IBeatmapLanguagesChangeHandler +public partial class BeatmapTranslationsChangeHandler : BeatmapListPropertyChangeHandler, IBeatmapTranslationsChangeHandler { public IBindableList Languages => Items; diff --git a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/IBeatmapLanguagesChangeHandler.cs b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/IBeatmapTranslationsChangeHandler.cs similarity index 90% rename from osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/IBeatmapLanguagesChangeHandler.cs rename to osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/IBeatmapTranslationsChangeHandler.cs index a20f47095..c9b68019f 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/IBeatmapLanguagesChangeHandler.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Beatmaps/IBeatmapTranslationsChangeHandler.cs @@ -6,7 +6,7 @@ namespace osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Beatmaps; -public interface IBeatmapLanguagesChangeHandler +public interface IBeatmapTranslationsChangeHandler { IBindableList Languages { get; } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/CreateNewLanguageButton.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/CreateNewTranslationButton.cs similarity index 78% rename from osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/CreateNewLanguageButton.cs rename to osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/CreateNewTranslationButton.cs index c9042342e..fa66e57c9 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/CreateNewLanguageButton.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/CreateNewTranslationButton.cs @@ -15,14 +15,14 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Translations.Components; -public partial class CreateNewLanguageButton : IconButton, IHasPopover +public partial class CreateNewTranslationButton : IconButton, IHasPopover { [Resolved] - private IBeatmapLanguagesChangeHandler beatmapLanguagesChangeHandler { get; set; } = null!; + private IBeatmapTranslationsChangeHandler beatmapTranslationsChangeHandler { get; set; } = null!; private readonly Bindable currentLanguage = new(); - public CreateNewLanguageButton() + public CreateNewTranslationButton() { Icon = FontAwesome.Solid.Plus; Action = this.ShowPopover; @@ -33,9 +33,9 @@ public CreateNewLanguageButton() if (newLanguage == null) return; - if (!beatmapLanguagesChangeHandler.Languages.Contains(newLanguage)) + if (!beatmapTranslationsChangeHandler.Languages.Contains(newLanguage)) { - beatmapLanguagesChangeHandler.Add(newLanguage); + beatmapTranslationsChangeHandler.Add(newLanguage); } // after selected the language, should always hide the popover. diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/RemoveLanguageButton.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/RemoveTranslationButton.cs similarity index 68% rename from osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/RemoveLanguageButton.cs rename to osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/RemoveTranslationButton.cs index 9efc98e0b..97720d88a 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/RemoveLanguageButton.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/Components/RemoveTranslationButton.cs @@ -11,10 +11,10 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Translations.Components; -public partial class RemoveLanguageButton : IconButton +public partial class RemoveTranslationButton : IconButton { [Resolved] - private IBeatmapLanguagesChangeHandler beatmapLanguagesChangeHandler { get; set; } = null!; + private IBeatmapTranslationsChangeHandler beatmapTranslationsChangeHandler { get; set; } = null!; [Resolved] private IDialogOverlay dialogOverlay { get; set; } = null!; @@ -22,22 +22,22 @@ public partial class RemoveLanguageButton : IconButton [Resolved] private IBindable currentLanguage { get; set; } = null!; - public RemoveLanguageButton() + public RemoveTranslationButton() { Icon = FontAwesome.Solid.Trash; Action = () => { - if (beatmapLanguagesChangeHandler.IsLanguageContainsTranslation(currentLanguage.Value)) + if (beatmapTranslationsChangeHandler.IsLanguageContainsTranslation(currentLanguage.Value)) { dialogOverlay.Push(new DeleteLanguagePopupDialog(currentLanguage.Value, isOk => { if (isOk) - beatmapLanguagesChangeHandler.Remove(currentLanguage.Value); + beatmapTranslationsChangeHandler.Remove(currentLanguage.Value); })); } else { - beatmapLanguagesChangeHandler.Remove(currentLanguage.Value); + beatmapTranslationsChangeHandler.Remove(currentLanguage.Value); } }; } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationEditSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationEditSection.cs index 2c25d126a..86ca23cf2 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationEditSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationEditSection.cs @@ -35,7 +35,7 @@ public partial class TranslationEditSection : Container, ITranslationInfoProvide private readonly Bindable currentLanguage = new(); [Resolved] - private IBeatmapLanguagesChangeHandler beatmapLanguagesChangeHandler { get; set; } = null!; + private IBeatmapTranslationsChangeHandler beatmapTranslationsChangeHandler { get; set; } = null!; private readonly IBindableList bindableLyrics = new BindableList(); @@ -102,12 +102,12 @@ public TranslationEditSection() RelativeSizeAxes = Axes.X, }, Empty(), - new CreateNewLanguageButton + new CreateNewTranslationButton { Y = 5, }, Empty(), - new RemoveLanguageButton + new RemoveTranslationButton { Y = 5, }, @@ -190,7 +190,7 @@ public TranslationEditSection() [BackgroundDependencyLoader] private void load(ILyricsProvider lyricsProvider, OverlayColourProvider colourProvider) { - languageDropdown.ItemSource = beatmapLanguagesChangeHandler.Languages; + languageDropdown.ItemSource = beatmapTranslationsChangeHandler.Languages; bindableLyrics.BindTo(lyricsProvider.BindableLyrics); diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationScreen.cs index ab6e2e2a9..b23a3b862 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translations/TranslationScreen.cs @@ -14,8 +14,8 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Translations; public partial class TranslationScreen : BeatmapEditorRoundedScreen { - [Cached(typeof(IBeatmapLanguagesChangeHandler))] - private readonly BeatmapLanguagesChangeHandler beatmapLanguagesChangeHandler; + [Cached(typeof(IBeatmapTranslationsChangeHandler))] + private readonly BeatmapTranslationsChangeHandler beatmapTranslationsChangeHandler; [Cached(typeof(ILyricTranslationChangeHandler))] private readonly LyricTranslationChangeHandler lyricTranslationChangeHandler; @@ -23,7 +23,7 @@ public partial class TranslationScreen : BeatmapEditorRoundedScreen public TranslationScreen() : base(KaraokeBeatmapEditorScreenMode.Translation) { - AddInternal(beatmapLanguagesChangeHandler = new BeatmapLanguagesChangeHandler()); + AddInternal(beatmapTranslationsChangeHandler = new BeatmapTranslationsChangeHandler()); AddInternal(lyricTranslationChangeHandler = new LyricTranslationChangeHandler()); }