Remove FluentBundle.Arguments helper method.
This commit is contained in:
@@ -168,7 +168,8 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
editorActorPreview = editorLayer.Add(actor);
|
||||
Text = FluentProvider.GetString(AddedActor,
|
||||
FluentBundle.Arguments("name", editorActorPreview.Info.Name, "id", editorActorPreview.ID));
|
||||
"name", editorActorPreview.Info.Name,
|
||||
"id", editorActorPreview.ID);
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
undoClipboard = CopySelectionContents();
|
||||
|
||||
Text = FluentProvider.GetString(CopiedTiles, FluentBundle.Arguments("amount", clipboard.Tiles.Count));
|
||||
Text = FluentProvider.GetString(CopiedTiles, "amount", clipboard.Tiles.Count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -308,13 +308,13 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
};
|
||||
|
||||
if (selection.Area != null)
|
||||
Text = FluentProvider.GetString(SelectedArea, FluentBundle.Arguments(
|
||||
"x", selection.Area.TopLeft.X,
|
||||
"y", selection.Area.TopLeft.Y,
|
||||
"width", selection.Area.BottomRight.X - selection.Area.TopLeft.X,
|
||||
"height", selection.Area.BottomRight.Y - selection.Area.TopLeft.Y));
|
||||
Text = FluentProvider.GetString(SelectedArea,
|
||||
"x", selection.Area.TopLeft.X,
|
||||
"y", selection.Area.TopLeft.Y,
|
||||
"width", selection.Area.BottomRight.X - selection.Area.TopLeft.X,
|
||||
"height", selection.Area.BottomRight.Y - selection.Area.TopLeft.Y);
|
||||
else if (selection.Actor != null)
|
||||
Text = FluentProvider.GetString(SelectedActor, FluentBundle.Arguments("id", selection.Actor.ID));
|
||||
Text = FluentProvider.GetString(SelectedActor, "id", selection.Actor.ID);
|
||||
else
|
||||
Text = FluentProvider.GetString(ClearedSelection);
|
||||
}
|
||||
@@ -360,8 +360,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
Actor = defaultBrush.Selection.Actor
|
||||
};
|
||||
|
||||
Text = FluentProvider.GetString(RemovedActor,
|
||||
FluentBundle.Arguments("name", actor.Info.Name, "id", actor.ID));
|
||||
Text = FluentProvider.GetString(RemovedActor, "name", actor.Info.Name, "id", actor.ID);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
@@ -397,8 +396,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
this.editorActorLayer = editorActorLayer;
|
||||
this.actor = actor;
|
||||
|
||||
Text = FluentProvider.GetString(RemovedActor,
|
||||
FluentBundle.Arguments("name", actor.Info.Name, "id", actor.ID));
|
||||
Text = FluentProvider.GetString(RemovedActor, "name", actor.Info.Name, "id", actor.ID);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
@@ -466,7 +464,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
to = worldRenderer.Viewport.ViewToWorld(pixelTo + pixelOffset) + cellOffset;
|
||||
layer.MoveActor(actor, to);
|
||||
|
||||
Text = FluentProvider.GetString(MovedActor, FluentBundle.Arguments("id", actor.ID, "x1", from.X, "y1", from.Y, "x2", to.X, "y2", to.Y));
|
||||
Text = FluentProvider.GetString(MovedActor, "id", actor.ID, "x1", from.X, "y1", from.Y, "x2", to.X, "y2", to.Y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,7 +485,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
this.resourceLayer = resourceLayer;
|
||||
this.cell = cell;
|
||||
|
||||
Text = FluentProvider.GetString(RemovedResource, FluentBundle.Arguments("type", resourceType));
|
||||
Text = FluentProvider.GetString(RemovedResource, "type", resourceType);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
|
||||
@@ -150,9 +150,9 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
}
|
||||
|
||||
if (type != null)
|
||||
Text = FluentProvider.GetString(AddedMarkerTiles, FluentBundle.Arguments("amount", paintTiles.Count, "type", type));
|
||||
Text = FluentProvider.GetString(AddedMarkerTiles, "amount", paintTiles.Count, "type", type);
|
||||
else
|
||||
Text = FluentProvider.GetString(RemovedMarkerTiles, FluentBundle.Arguments("amount", paintTiles.Count));
|
||||
Text = FluentProvider.GetString(RemovedMarkerTiles, "amount", paintTiles.Count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
tiles = new HashSet<CPos>(markerLayerOverlay.Tiles[tile]);
|
||||
|
||||
Text = FluentProvider.GetString(ClearedSelectedMarkerTiles, FluentBundle.Arguments("amount", tiles.Count, "type", tile));
|
||||
Text = FluentProvider.GetString(ClearedSelectedMarkerTiles, "amount", tiles.Count, "type", tile);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
@@ -213,7 +213,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var allTilesCount = tiles.Values.Select(x => x.Count).Sum();
|
||||
|
||||
Text = FluentProvider.GetString(ClearedAllMarkerTiles, FluentBundle.Arguments("amount", allTilesCount));
|
||||
Text = FluentProvider.GetString(ClearedAllMarkerTiles, "amount", allTilesCount);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
resourceLayer.ClearResources(resourceCell.Cell);
|
||||
resourceLayer.AddResource(resourceCell.NewResourceType, resourceCell.Cell, resourceLayer.GetMaxDensity(resourceCell.NewResourceType));
|
||||
cellResources.Add(resourceCell);
|
||||
Text = FluentProvider.GetString(AddedResource, FluentBundle.Arguments("amount", cellResources.Count, "type", resourceType));
|
||||
Text = FluentProvider.GetString(AddedResource, "amount", cellResources.Count, "type", resourceType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var terrainInfo = (ITemplatedTerrainInfo)map.Rules.TerrainInfo;
|
||||
terrainTemplate = terrainInfo.Templates[template];
|
||||
Text = FluentProvider.GetString(AddedTile, FluentBundle.Arguments("id", terrainTemplate.Id));
|
||||
Text = FluentProvider.GetString(AddedTile, "id", terrainTemplate.Id);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
@@ -264,7 +264,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var terrainInfo = (ITemplatedTerrainInfo)map.Rules.TerrainInfo;
|
||||
terrainTemplate = terrainInfo.Templates[template];
|
||||
Text = FluentProvider.GetString(FilledTile, FluentBundle.Arguments("id", terrainTemplate.Id));
|
||||
Text = FluentProvider.GetString(FilledTile, "id", terrainTemplate.Id);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
|
||||
Reference in New Issue
Block a user