Localise ranking tables.

This commit is contained in:
Lucas A
2021-07-30 15:24:10 +02:00
parent 9717281969
commit db1ed873e4
5 changed files with 34 additions and 27 deletions

View File

@ -4,6 +4,8 @@
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
namespace osu.Game.Overlays.Rankings.Tables
@ -17,19 +19,19 @@ namespace osu.Game.Overlays.Rankings.Tables
protected override RankingsTableColumn[] CreateUniqueHeaders() => new[]
{
new RankingsTableColumn("Total Score", Anchor.Centre, new Dimension(GridSizeMode.AutoSize)),
new RankingsTableColumn("Ranked Score", Anchor.Centre, new Dimension(GridSizeMode.AutoSize), true)
new RankingsTableColumn(RankingsStrings.StatTotalScore, Anchor.Centre, new Dimension(GridSizeMode.AutoSize)),
new RankingsTableColumn(RankingsStrings.StatRankedScore, Anchor.Centre, new Dimension(GridSizeMode.AutoSize), true)
};
protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[]
{
new ColoredRowText
{
Text = $@"{item.TotalScore:N0}",
Text = item.TotalScore.ToLocalisableString("N0"),
},
new RowText
{
Text = $@"{item.RankedScore:N0}",
Text = item.RankedScore.ToLocalisableString("N0")
}
};
}