Skip to content

Commit

Permalink
Rename in the screen namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Jul 5, 2024
1 parent 7dd04c2 commit 917cf37
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial class LyricPreview : SettingsSubsectionPreview
private readonly Bindable<FontUsage> mainFont = new();
private readonly Bindable<FontUsage> rubyFont = new();
private readonly Bindable<FontUsage> romanisationFont = new();
private readonly Bindable<FontUsage> translateFont = new();
private readonly Bindable<FontUsage> translationFont = new();
private readonly Bindable<CultureInfo> preferLanguage = new();

[Resolved]
Expand Down Expand Up @@ -64,13 +64,13 @@ public LyricPreview()
{
addFont(e.NewValue);
});
translateFont.BindValueChanged(e =>
translationFont.BindValueChanged(e =>
{
addFont(e.NewValue);
});
preferLanguage.BindValueChanged(e =>
{
lyric.Translations = createPreviewTranslate(e.NewValue);
lyric.Translations = createPreviewTranslation(e.NewValue);
});

void addFont(FontUsage fontUsage)
Expand All @@ -95,7 +95,7 @@ private void load(FontManager fontManager, IRenderer renderer, KaraokeRulesetCon
config.BindWith(KaraokeRulesetSetting.MainFont, mainFont);
config.BindWith(KaraokeRulesetSetting.RubyFont, rubyFont);
config.BindWith(KaraokeRulesetSetting.RomanisationFont, romanisationFont);
config.BindWith(KaraokeRulesetSetting.TranslateFont, translateFont);
config.BindWith(KaraokeRulesetSetting.TranslateFont, translationFont);
config.BindWith(KaraokeRulesetSetting.PreferLanguage, preferLanguage);
}

Expand Down Expand Up @@ -143,9 +143,9 @@ private Lyric createPreviewLyric()
EffectApplier = new PreviewLyricEffectApplier(),
};

private IDictionary<CultureInfo, string> createPreviewTranslate(CultureInfo cultureInfo)
private IDictionary<CultureInfo, string> createPreviewTranslation(CultureInfo cultureInfo)
{
string translate = cultureInfo.Name switch
string translation = cultureInfo.Name switch
{
"ja" or "Ja-jp" => "カラオケ",
"zh-Hant" or "zh-TW" => "卡拉OK",
Expand All @@ -154,7 +154,7 @@ private IDictionary<CultureInfo, string> createPreviewTranslate(CultureInfo cult

return new Dictionary<CultureInfo, string>
{
{ cultureInfo, translate },
{ cultureInfo, translation },
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ConfigSection()
{
new GeneralSettings(),
new NoteSettings(),
new TranslateSettings(),
new TranslationSettings(),
new PracticeSettings(),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace osu.Game.Rulesets.Karaoke.Screens.Settings.Sections.Gameplay;

public partial class TranslateSettings : KaraokeSettingsSubsection
public partial class TranslationSettings : KaraokeSettingsSubsection
{
protected override LocalisableString Header => "Translate";
protected override LocalisableString Header => "Translation";

public override SettingsSubsectionPreview CreatePreview() => new LyricPreview();

Expand All @@ -25,7 +25,7 @@ private void load()
new SettingsLanguage
{
LabelText = "Prefer language",
TooltipText = "Select prefer translate language.",
TooltipText = "Select prefer translation.",
Current = Config.GetBindable<CultureInfo>(KaraokeRulesetSetting.PreferLanguage),
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ private void load()
},
new SettingsFont
{
LabelText = "Translate font",
LabelText = "Translation font",
Current = Config.GetBindable<FontUsage>(KaraokeRulesetSetting.TranslateFont),
},
new SettingsCheckbox
{
LabelText = "Force use default translate font.",
LabelText = "Force use default translation font.",
TooltipText = "Force use default font even has customize font in skin or beatmap.",
Current = Config.GetBindable<bool>(KaraokeRulesetSetting.ForceUseDefaultTranslateFont),
},
Expand Down

0 comments on commit 917cf37

Please sign in to comment.