Use existing web localisation for most hardcoded strings

This commit is contained in:
Joseph Madamba
2022-01-27 20:53:48 -08:00
parent fb5fcdd083
commit 5e5c8e78a6
70 changed files with 224 additions and 147 deletions

View File

@ -14,6 +14,7 @@ using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Play.HUD;
using osuTK;
@ -158,7 +159,7 @@ namespace osu.Game.Screens.Play
{
new Drawable[]
{
new MetadataLineLabel("Source"),
new MetadataLineLabel(BeatmapsetsStrings.ShowInfoSource),
new MetadataLineInfo(metadata.Source)
},
new Drawable[]
@ -213,7 +214,7 @@ namespace osu.Game.Screens.Play
private class MetadataLineLabel : OsuSpriteText
{
public MetadataLineLabel(string text)
public MetadataLineLabel(LocalisableString text)
{
Anchor = Anchor.TopRight;
Origin = Anchor.TopRight;
@ -225,10 +226,10 @@ namespace osu.Game.Screens.Play
private class MetadataLineInfo : OsuSpriteText
{
public MetadataLineInfo(string text)
public MetadataLineInfo(LocalisableString text)
{
Margin = new MarginPadding { Left = 5 };
Text = string.IsNullOrEmpty(text) ? @"-" : text;
Text = string.IsNullOrEmpty(text.ToString()) ? @"-" : text;
}
}
}