Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
});
var replayDuration = new CachedTransform<ReplayMetadata, string>(r =>
"Duration: {0}".F(WidgetUtils.FormatTimeSeconds((int)selectedReplay.GameInfo.Duration.TotalSeconds)));
$"Duration: {WidgetUtils.FormatTimeSeconds((int)selectedReplay.GameInfo.Duration.TotalSeconds)}");
panel.Get<LabelWidget>("DURATION").GetText = () => replayDuration.Update(selectedReplay);
SetupFilters();
@@ -424,7 +424,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
ConfirmationDialogs.ButtonPrompt(
title: "Delete selected replay?",
text: "Delete replay '{0}'?".F(Path.GetFileNameWithoutExtension(r.FilePath)),
text: $"Delete replay '{Path.GetFileNameWithoutExtension(r.FilePath)}'?",
onConfirm: () =>
{
DeleteReplay(r);
@@ -461,7 +461,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
ConfirmationDialogs.ButtonPrompt(
title: "Delete all selected replays?",
text: "Delete {0} replays?".F(list.Count),
text: $"Delete {list.Count} replays?",
onConfirm: () =>
{
list.ForEach(DeleteReplay);
@@ -635,7 +635,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var noTeams = players.Count() == 1;
foreach (var p in players)
{
var label = noTeams ? "Players" : p.Key == 0 ? "No Team" : "Team {0}".F(p.Key);
var label = noTeams ? "Players" : p.Key == 0 ? "No Team" : $"Team {p.Key}";
teams.Add(label, p);
}