1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

Localise collapsed header container.

This commit is contained in:
Lucas A 2021-07-23 23:12:22 +02:00
parent ff3d38de6f
commit a3f9d96a8e
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Localisation;
using osu.Game.Overlays.Profile.Header.Components; using osu.Game.Overlays.Profile.Header.Components;
using osu.Game.Resources.Localisation.Web; using osu.Game.Resources.Localisation.Web;
using osu.Game.Users; using osu.Game.Users;
@ -145,8 +146,8 @@ namespace osu.Game.Overlays.Profile.Header
private void updateDisplay(User user) private void updateDisplay(User user)
{ {
hiddenDetailGlobal.Content = user?.Statistics?.GlobalRank?.ToString("\\##,##0") ?? "-"; hiddenDetailGlobal.Content = user?.Statistics?.GlobalRank != null ? (LocalisableString)user?.Statistics?.GlobalRank.ToLocalisableString("\\##,##0") : "-";
hiddenDetailCountry.Content = user?.Statistics?.CountryRank?.ToString("\\##,##0") ?? "-"; hiddenDetailCountry.Content = user?.Statistics?.CountryRank != null ? (LocalisableString)user?.Statistics?.CountryRank.ToLocalisableString("\\##,##0") : "-";
} }
} }
} }

View File

@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
set => title.Text = value; set => title.Text = value;
} }
public string Content public LocalisableString Content
{ {
set => content.Text = value; set => content.Text = value;
} }