mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Use existing web localisation for most hardcoded strings
This commit is contained in:
@ -6,6 +6,7 @@ using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Screens.Ranking.Expanded.Accuracy;
|
||||
using osu.Game.Utils;
|
||||
using osuTK;
|
||||
@ -26,7 +27,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
/// </summary>
|
||||
/// <param name="accuracy">The accuracy to display.</param>
|
||||
public AccuracyStatistic(double accuracy)
|
||||
: base("accuracy")
|
||||
: base(BeatmapsetsStrings.ShowScoreboardHeadersAccuracy)
|
||||
{
|
||||
this.accuracy = accuracy;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Screens.Ranking.Expanded.Accuracy;
|
||||
using osuTK;
|
||||
|
||||
@ -27,7 +28,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
/// <param name="combo">The combo to be displayed.</param>
|
||||
/// <param name="maxCombo">The maximum value of <paramref name="combo"/>.</param>
|
||||
public ComboStatistic(int combo, int? maxCombo)
|
||||
: base("combo", combo, maxCombo)
|
||||
: base(BeatmapsetsStrings.ShowScoreboardHeadersCombo, combo, maxCombo)
|
||||
{
|
||||
isPerfect = combo == maxCombo;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -26,7 +27,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
/// <param name="header">The name of the statistic.</param>
|
||||
/// <param name="count">The value to display.</param>
|
||||
/// <param name="maxCount">The maximum value of <paramref name="count"/>. Not displayed if null.</param>
|
||||
public CounterStatistic(string header, int count, int? maxCount = null)
|
||||
public CounterStatistic(LocalisableString header, int count, int? maxCount = null)
|
||||
: base(header)
|
||||
{
|
||||
this.count = count;
|
||||
|
@ -8,6 +8,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
@ -23,7 +24,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
private RollingCounter<int> counter;
|
||||
|
||||
public PerformanceStatistic(ScoreInfo score)
|
||||
: base("PP")
|
||||
: base(BeatmapsetsStrings.ShowScoreboardHeaderspp)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
@ -3,10 +3,12 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
@ -19,14 +21,14 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
{
|
||||
protected SpriteText HeaderText { get; private set; }
|
||||
|
||||
private readonly string header;
|
||||
private readonly LocalisableString header;
|
||||
private Drawable content;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="StatisticDisplay"/>.
|
||||
/// </summary>
|
||||
/// <param name="header">The name of the statistic.</param>
|
||||
protected StatisticDisplay(string header)
|
||||
protected StatisticDisplay(LocalisableString header)
|
||||
{
|
||||
this.header = header;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
@ -60,7 +62,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.Torus.With(size: 12, weight: FontWeight.SemiBold),
|
||||
Text = header.ToUpperInvariant(),
|
||||
Text = header.ToUpper(),
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user