mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:22:57 +08:00
Remove simple localisable .ToString()
calls
This commit is contained in:
parent
11de924704
commit
ed00cd9fc5
@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Changelog
|
||||
t.Colour = colour.PinkLighter;
|
||||
})
|
||||
{
|
||||
Text = ChangelogStrings.SupportText2.ToString(),
|
||||
Text = ChangelogStrings.SupportText2,
|
||||
Margin = new MarginPadding { Top = 10 },
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -83,7 +83,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
cp.Font = OsuFont.Default.With(size: 24);
|
||||
})
|
||||
{
|
||||
Text = HeaderText.ToString(),
|
||||
Text = HeaderText,
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
Margin = new MarginPadding(10),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
@ -16,8 +16,7 @@ namespace osu.Game.Overlays.Settings
|
||||
public override LocalisableString LabelText
|
||||
{
|
||||
get => labelText;
|
||||
// checkbox doesn't properly support localisation yet.
|
||||
set => ((OsuCheckbox)Control).LabelText = (labelText = value).ToString();
|
||||
set => ((OsuCheckbox)Control).LabelText = labelText = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
set
|
||||
{
|
||||
bool hasValue = !string.IsNullOrWhiteSpace(value.ToString());
|
||||
bool hasValue = value != default;
|
||||
|
||||
if (warningText == null)
|
||||
{
|
||||
@ -80,7 +80,7 @@ namespace osu.Game.Overlays.Settings
|
||||
}
|
||||
|
||||
warningText.Alpha = hasValue ? 1 : 0;
|
||||
warningText.Text = value.ToString(); // TODO: Remove ToString() call after TextFlowContainer supports localisation (see https://github.com/ppy/osu-framework/issues/4636).
|
||||
warningText.Text = value ?? default;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System.Collections.Specialized;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -46,7 +47,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
private void updateCount(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
count.Clear();
|
||||
count.AddText(Playlist.Count.ToString(), s => s.Font = s.Font.With(weight: FontWeight.Bold));
|
||||
count.AddText(Playlist.Count.ToLocalisableString(), s => s.Font = s.Font.With(weight: FontWeight.Bold));
|
||||
count.AddText(" ");
|
||||
count.AddText("Beatmap".ToQuantity(Playlist.Count, ShowQuantityAs.None));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user