Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the remaining romaji wording. #2188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class RubyTagGeneratorSelectorTest : BaseLyricGeneratorSelectorTest<RubyT
{
[TestCase(17, "花火大会", true)]
[TestCase(17, "我是中文", true)] // only change the language code to decide should be able to generate or not.
[TestCase(17, "", false)] // will not able to generate the romaji if lyric is empty.
[TestCase(17, "", false)] // will not able to generate the romanisation if lyric is empty.
[TestCase(17, " ", false)]
[TestCase(17, null, false)]
[TestCase(1028, "はなび", false)] // Should not be able to generate if language is not supported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class JaTimeTagGeneratorTest : BaseTimeTagGeneratorTest<JaTimeTagGenerato
[TestCase("花火大会", true)]
[TestCase("!", true)]
[TestCase(" ", true)]
[TestCase("", false)] // will not able to generate the romaji if lyric is empty.
[TestCase("", false)] // will not able to generate the romanisation if lyric is empty.
[TestCase(null, false)]
public void TestCanGenerate(string text, bool canGenerate)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class TimeTagGeneratorSelectorTest : BaseLyricGeneratorSelectorTest<TimeT
[TestCase(17, "花火大会", true)]
[TestCase(1028, "喵", true)] // Support the chinese.
[TestCase(3081, "hello", false)] // English is not supported.
[TestCase(17, "", false)] // will not able to generate the romaji if lyric is empty.
[TestCase(17, "", false)] // will not able to generate the romanisation if lyric is empty.
[TestCase(17, " ", false)]
[TestCase(17, null, false)]
public void TestCanGenerate(int lcid, string text, bool canGenerate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ZhTimeTagGeneratorTest : BaseTimeTagGeneratorTest<ZhTimeTagGenerato
[TestCase("拉拉拉~~~", true)]
[TestCase("~~~", true)]
[TestCase(" ", true)]
[TestCase("", false)] // will not able to generate the romaji if lyric is empty.
[TestCase("", false)] // will not able to generate the romanisation if lyric is empty.
[TestCase(null, false)]
public void TestCanGenerate(string text, bool canGenerate)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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<IKaraokeSkinElement>(json, CreateSettings())!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"family": "Torus",
"weight": "Bold"
},
"romaji_text_font": {
"romanisation_text_font": {
"family": "Torus",
"weight": "Bold"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/Singer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ public string Name
}

[JsonIgnore]
public readonly Bindable<string> RomajiNameBindable = new();
public readonly Bindable<string> RomanisationBindable = new();

public string RomajiName
public string Romanisation
{
get => RomajiNameBindable.Value;
set => RomajiNameBindable.Value = value;
get => RomanisationBindable.Value;
set => RomanisationBindable.Value = value;
}

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -83,7 +83,7 @@ protected override void AddBindable<TBindable>(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<FontUsage>(bindable.Value)));
Expand Down Expand Up @@ -164,8 +164,8 @@ public enum KaraokeRulesetSetting
MainFont,
RubyFont,
RubyMargin,
RomajiFont,
RomajiMargin,
RomanisationFont,
RomanisationMargin,
ForceUseDefaultFont,
TranslateFont,
ForceUseDefaultTranslateFont,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected override void InitialiseDefaults()
SetDefault<JaTimeTagGeneratorConfig>();
SetDefault<ZhTimeTagGeneratorConfig>();

// Romaji generator
// Romanisation generator
SetDefault<JaRomanisationGeneratorConfig>();

// Note generator
Expand Down Expand Up @@ -79,7 +79,7 @@ protected static KaraokeRulesetEditGeneratorSetting GetSettingByType<TValue>() =
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(),
};
Expand Down Expand Up @@ -129,8 +129,8 @@ public enum KaraokeRulesetEditGeneratorSetting
JaTimeTagGeneratorConfig,
ZhTimeTagGeneratorConfig,

// Romaji generator.
JaRomajiGeneratorConfig,
// Romanisation generator.
JaRomanisationGeneratorConfig,

// Note generator
NoteGeneratorConfig,
Expand Down
32 changes: 16 additions & 16 deletions osu.Game.Rulesets.Karaoke/Graphics/Cursor/SingerToolTip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ public partial class SingerToolTip : BackgroundToolTip<ISinger>
private const int sub_text_size = 12;

private readonly IBindable<string> bindableName = new Bindable<string>();
private readonly IBindable<string> bindableRomajiName = new Bindable<string>();
private readonly IBindable<string> bindableRomanisation = new Bindable<string>();
private readonly IBindable<string> bindableEnglishName = new Bindable<string>();
private readonly IBindable<string> bindableDescription = new Bindable<string>();

[Cached(typeof(IKaraokeBeatmapResourcesProvider))]
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()
{
Expand Down Expand Up @@ -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,
Expand All @@ -115,7 +115,7 @@ public SingerToolTip()
},
},
},
singerDescription = new OsuSpriteText
description = new OsuSpriteText
{
RelativeSizeAxes = Axes.X,
AllowMultiline = true,
Expand All @@ -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) ? "<No description>" : 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) ? "<No description>" : e.NewValue, true);
}

private ISinger? lastSinger;
Expand All @@ -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);
}
Expand Down
12 changes: 6 additions & 6 deletions osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public partial class DrawableLyric : DrawableKaraokeHitObject
private readonly Bindable<FontUsage> mainFontUsageBindable = new();
private readonly Bindable<FontUsage> rubyFontUsageBindable = new();
private readonly Bindable<int> rubyMarginBindable = new();
private readonly Bindable<FontUsage> romajiFontUsageBindable = new();
private readonly Bindable<int> romajiMarginBindable = new();
private readonly Bindable<FontUsage> romanisationFontUsageBindable = new();
private readonly Bindable<int> romanisationMarginBindable = new();
private readonly Bindable<FontUsage> translateFontUsageBindable = new();

private readonly IBindableDictionary<Singer, SingerState[]> singersBindable = new BindableDictionary<Singer, SingerState[]>();
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"family": "Torus",
"weight": "Bold"
},
"romaji_text_font": {
"romanisation_text_font": {
"family": "Torus",
"weight": "Bold"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading