diff --git a/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/FontSelector.cs b/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/FontSelector.cs index 310a7303a..43975fcf3 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/FontSelector.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/FontSelector.cs @@ -327,7 +327,7 @@ private void load(OsuColour colours) _ => throw new ArgumentOutOfRangeException(nameof(fontFormat)), }; - // todo : might apply translate. + // todo : might apply translation. badgeText.Text = fontFormat.ToString(); } } diff --git a/osu.Game.Rulesets.Karaoke/Localisation/KaraokeSettingsSubsectionStrings.cs b/osu.Game.Rulesets.Karaoke/Localisation/KaraokeSettingsSubsectionStrings.cs index 5d3cb67ac..7f59b7e64 100644 --- a/osu.Game.Rulesets.Karaoke/Localisation/KaraokeSettingsSubsectionStrings.cs +++ b/osu.Game.Rulesets.Karaoke/Localisation/KaraokeSettingsSubsectionStrings.cs @@ -44,9 +44,9 @@ public static class KaraokeSettingsSubsectionStrings public static LocalisableString PreferLanguage => new TranslatableString(getKey(@"prefer_language"), @"Prefer language"); /// - /// "Select prefer translate language." + /// "Select prefer translation language." /// - public static LocalisableString PreferLanguageTooltip => new TranslatableString(getKey(@"prefer_language_tooltip"), @"Select prefer translate language."); + public static LocalisableString PreferTranslationLanguageTooltip => new TranslatableString(getKey(@"prefer_language_tooltip"), @"Select prefer translation language."); /// /// "Microphone device" diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs index 6b2f44acb..b0783acf0 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs @@ -22,9 +22,9 @@ namespace osu.Game.Rulesets.Karaoke.Objects.Drawables; public partial class DrawableLyric : DrawableKaraokeHitObject { private Container lyricPieces = null!; - private OsuSpriteText translateText = null!; + private OsuSpriteText translationText = null!; - private readonly BindableBool useTranslateBindable = new(); + private readonly BindableBool useTranslationBindable = new(); private readonly Bindable preferLanguageBindable = new(); private readonly Bindable mainFontUsageBindable = new(); @@ -32,10 +32,10 @@ public partial class DrawableLyric : DrawableKaraokeHitObject private readonly Bindable rubyMarginBindable = new(); private readonly Bindable romanisationFontUsageBindable = new(); private readonly Bindable romanisationMarginBindable = new(); - private readonly Bindable translateFontUsageBindable = new(); + private readonly Bindable translationFontUsageBindable = new(); private readonly IBindableDictionary singersBindable = new BindableDictionary(); - private readonly BindableDictionary translateTextBindable = new(); + private readonly BindableDictionary translationTextBindable = new(); public event Action? OnLyricStart; public event Action? OnLyricEnd; @@ -61,14 +61,14 @@ private void load(KaraokeRulesetConfigManager? config) { AutoSizeAxes = Axes.Both, }); - AddInternal(translateText = new OsuSpriteText + AddInternal(translationText = new OsuSpriteText { Anchor = Anchor.BottomLeft, Origin = Anchor.TopLeft, }); - useTranslateBindable.BindValueChanged(_ => applyTranslate(), true); - preferLanguageBindable.BindValueChanged(_ => applyTranslate(), true); + useTranslationBindable.BindValueChanged(_ => applyTranslation(), true); + preferLanguageBindable.BindValueChanged(_ => applyTranslation(), true); if (config != null) { @@ -77,7 +77,7 @@ private void load(KaraokeRulesetConfigManager? config) config.BindWith(KaraokeRulesetSetting.RubyMargin, rubyMarginBindable); config.BindWith(KaraokeRulesetSetting.RomanisationFont, romanisationFontUsageBindable); config.BindWith(KaraokeRulesetSetting.RomanisationMargin, romanisationMarginBindable); - config.BindWith(KaraokeRulesetSetting.TranslationFont, translateFontUsageBindable); + config.BindWith(KaraokeRulesetSetting.TranslationFont, translationFontUsageBindable); } mainFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); @@ -85,11 +85,11 @@ private void load(KaraokeRulesetConfigManager? config) rubyMarginBindable.BindValueChanged(_ => updateLyricFontInfo()); romanisationFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); romanisationMarginBindable.BindValueChanged(_ => updateLyricFontInfo()); - translateFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); + translationFontUsageBindable.BindValueChanged(_ => updateLyricFontInfo()); // property in hitobject. singersBindable.BindCollectionChanged((_, _) => { updateFontStyle(); }); - translateTextBindable.BindCollectionChanged((_, _) => { applyTranslate(); }); + translationTextBindable.BindCollectionChanged((_, _) => { applyTranslation(); }); } public void ChangeDisplayType(LyricDisplayType lyricDisplayType) @@ -104,11 +104,11 @@ public void ChangeDisplayProperty(LyricDisplayProperty lyricDisplayProperty) public void ChangePreferTranslationLanguage(CultureInfo? language) { - if (language != null && translateTextBindable.TryGetValue(language, out string? translate)) - translateText.Text = translate; + if (language != null && translationTextBindable.TryGetValue(language, out string? translation)) + translationText.Text = translation; else { - translateText.Text = string.Empty; + translationText.Text = string.Empty; } } @@ -121,7 +121,7 @@ protected override void OnApply() ApplySkin(CurrentSkin, false); singersBindable.BindTo(HitObject.SingersBindable); - translateTextBindable.BindTo(HitObject.TranslationsBindable); + translationTextBindable.BindTo(HitObject.TranslationsBindable); } protected override void OnFree() @@ -129,7 +129,7 @@ protected override void OnFree() base.OnFree(); singersBindable.UnbindFrom(HitObject.SingersBindable); - translateTextBindable.UnbindFrom(HitObject.TranslationsBindable); + translationTextBindable.UnbindFrom(HitObject.TranslationsBindable); } protected override void ApplySkin(ISkinSource skin, bool allowFallback) @@ -164,19 +164,19 @@ private void updateLyricFontInfo() lyricFontInfo?.ApplyTo(this); } - private void applyTranslate() + private void applyTranslation() { var language = preferLanguageBindable.Value; - bool needTranslate = useTranslateBindable.Value; + bool useTranslation = useTranslationBindable.Value; - if (!needTranslate || language == null) + if (!useTranslation || language == null) { - translateText.Text = string.Empty; + translationText.Text = string.Empty; } else { - if (translateTextBindable.TryGetValue(language, out string? translate)) - translateText.Text = translate; + if (translationTextBindable.TryGetValue(language, out string? translation)) + translationText.Text = translation; } } @@ -216,8 +216,8 @@ public void ApplyToLyricPieces(Action action) action?.Invoke(lyricPiece); } - public void ApplyToTranslateText(Action action) + public void ApplyToTranslationText(Action action) { - action?.Invoke(translateText); + action?.Invoke(translationText); } } diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs index 7c2e8dd26..a14ceb652 100644 --- a/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs +++ b/osu.Game.Rulesets.Karaoke/Skinning/Elements/LyricFontInfo.cs @@ -115,8 +115,8 @@ public void ApplyTo(Drawable d) l.BottomTextMargin = RomanisationMargin; }); - // Apply translate font. - drawableLyric.ApplyToTranslateText(text => + // Apply translation font. + drawableLyric.ApplyToTranslationText(text => { text.Font = getFont(KaraokeRulesetSetting.TranslationFont); });