User verbatim string for ToLocalisableString calls (and rename US spelling)

This commit is contained in:
Dean Herbert 2021-07-31 14:27:20 +09:00
parent c7e9d09ce3
commit e6f337a3c8
6 changed files with 23 additions and 23 deletions

View File

@ -124,11 +124,11 @@ namespace osu.Game.Overlays.Rankings
{ {
startDateColumn.Value = dateToString(response.Spotlight.StartDate); startDateColumn.Value = dateToString(response.Spotlight.StartDate);
endDateColumn.Value = dateToString(response.Spotlight.EndDate); endDateColumn.Value = dateToString(response.Spotlight.EndDate);
mapCountColumn.Value = response.BeatmapSets.Count.ToLocalisableString("N0"); mapCountColumn.Value = response.BeatmapSets.Count.ToLocalisableString(@"N0");
participantsColumn.Value = response.Spotlight.Participants?.ToLocalisableString("N0"); participantsColumn.Value = response.Spotlight.Participants?.ToLocalisableString(@"N0");
} }
private LocalisableString dateToString(DateTimeOffset date) => date.ToLocalisableString("yyyy-MM-dd"); private LocalisableString dateToString(DateTimeOffset date) => date.ToLocalisableString(@"yyyy-MM-dd");
private class InfoColumn : FillFlowContainer private class InfoColumn : FillFlowContainer
{ {

View File

@ -37,29 +37,29 @@ namespace osu.Game.Overlays.Rankings.Tables
protected override Drawable[] CreateAdditionalContent(CountryStatistics item) => new Drawable[] protected override Drawable[] CreateAdditionalContent(CountryStatistics item) => new Drawable[]
{ {
new ColoredRowText new ColouredRowText
{ {
Text = item.ActiveUsers.ToLocalisableString("N0") Text = item.ActiveUsers.ToLocalisableString(@"N0")
}, },
new ColoredRowText new ColouredRowText
{ {
Text = item.PlayCount.ToLocalisableString("N0") Text = item.PlayCount.ToLocalisableString(@"N0")
}, },
new ColoredRowText new ColouredRowText
{ {
Text = item.RankedScore.ToLocalisableString("N0") Text = item.RankedScore.ToLocalisableString(@"N0")
}, },
new ColoredRowText new ColouredRowText
{ {
Text = (item.RankedScore / Math.Max(item.ActiveUsers, 1)).ToLocalisableString("N0") Text = (item.RankedScore / Math.Max(item.ActiveUsers, 1)).ToLocalisableString(@"N0")
}, },
new RowText new RowText
{ {
Text = item.Performance.ToLocalisableString("N0") Text = item.Performance.ToLocalisableString(@"N0")
}, },
new ColoredRowText new ColouredRowText
{ {
Text = (item.Performance / Math.Max(item.ActiveUsers, 1)).ToLocalisableString("N0") Text = (item.Performance / Math.Max(item.ActiveUsers, 1)).ToLocalisableString(@"N0")
} }
}; };

View File

@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Rankings.Tables
protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[] protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[]
{ {
new RowText { Text = item.PP.ToLocalisableString("N0"), } new RowText { Text = item.PP.ToLocalisableString(@"N0"), }
}; };
} }
} }

View File

@ -80,7 +80,7 @@ namespace osu.Game.Overlays.Rankings.Tables
private OsuSpriteText createIndexDrawable(int index) => new RowText private OsuSpriteText createIndexDrawable(int index) => new RowText
{ {
Text = (index + 1).ToLocalisableString("\\##"), Text = (index + 1).ToLocalisableString(@"\##"),
Font = OsuFont.GetFont(size: TEXT_SIZE, weight: FontWeight.SemiBold) Font = OsuFont.GetFont(size: TEXT_SIZE, weight: FontWeight.SemiBold)
}; };
@ -144,7 +144,7 @@ namespace osu.Game.Overlays.Rankings.Tables
} }
} }
protected class ColoredRowText : RowText protected class ColouredRowText : RowText
{ {
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider) private void load(OverlayColourProvider colourProvider)

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Rankings.Tables
protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[] protected override Drawable[] CreateUniqueContent(UserStatistics item) => new Drawable[]
{ {
new ColoredRowText new ColouredRowText
{ {
Text = item.TotalScore.ToLocalisableString("N0"), Text = item.TotalScore.ToLocalisableString("N0"),
}, },

View File

@ -47,13 +47,13 @@ namespace osu.Game.Overlays.Rankings.Tables
protected sealed override Drawable[] CreateAdditionalContent(UserStatistics item) => new[] protected sealed override Drawable[] CreateAdditionalContent(UserStatistics item) => new[]
{ {
new ColoredRowText { Text = item.DisplayAccuracy, }, new ColouredRowText { Text = item.DisplayAccuracy, },
new ColoredRowText { Text = item.PlayCount.ToLocalisableString("N0") }, new ColouredRowText { Text = item.PlayCount.ToLocalisableString("N0") },
}.Concat(CreateUniqueContent(item)).Concat(new[] }.Concat(CreateUniqueContent(item)).Concat(new[]
{ {
new ColoredRowText { Text = (item.GradesCount[ScoreRank.XH] + item.GradesCount[ScoreRank.X]).ToLocalisableString("N0"), }, new ColouredRowText { Text = (item.GradesCount[ScoreRank.XH] + item.GradesCount[ScoreRank.X]).ToLocalisableString("N0"), },
new ColoredRowText { Text = (item.GradesCount[ScoreRank.SH] + item.GradesCount[ScoreRank.S]).ToLocalisableString("N0"), }, new ColouredRowText { Text = (item.GradesCount[ScoreRank.SH] + item.GradesCount[ScoreRank.S]).ToLocalisableString("N0"), },
new ColoredRowText { Text = item.GradesCount[ScoreRank.A].ToLocalisableString("N0"), } new ColouredRowText { Text = item.GradesCount[ScoreRank.A].ToLocalisableString("N0"), }
}).ToArray(); }).ToArray();
protected abstract RankingsTableColumn[] CreateUniqueHeaders(); protected abstract RankingsTableColumn[] CreateUniqueHeaders();