Use LocalisableString.Interpolate instead of invalid TranslatableStrings

This commit is contained in:
Salman Ahmed 2022-04-28 11:38:40 +03:00
parent be2d616e34
commit 691bec6f16
2 changed files with 4 additions and 4 deletions

View File

@ -317,11 +317,11 @@ namespace osu.Game.Overlays
}
else
{
BackButton.Text = new TranslatableString(@"_", @"{0} ({1})", CommonStrings.Back, steps[currentStepIndex.Value - 1].Description);
BackButton.Text = LocalisableString.Interpolate($@"{CommonStrings.Back} ({steps[currentStepIndex.Value - 1].Description})");
NextButton.Text = isLastStep
? CommonStrings.Finish
: new TranslatableString(@"_", @"{0} ({1})", CommonStrings.Next, steps[currentStepIndex.Value + 1].Description);
: LocalisableString.Interpolate($@"{CommonStrings.Next} ({steps[currentStepIndex.Value + 1].Description})");
}
}

View File

@ -99,8 +99,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
{
public override LocalisableString TooltipText =>
Current.Value == 0
? new TranslatableString("_", @"{0} ms", base.TooltipText)
: new TranslatableString("_", @"{0} ms {1}", base.TooltipText, getEarlyLateText(Current.Value));
? LocalisableString.Interpolate($@"{base.TooltipText} ms")
: LocalisableString.Interpolate($@"{base.TooltipText} ms {getEarlyLateText(Current.Value)}");
private LocalisableString getEarlyLateText(double value)
{