Switch to count naming

This commit is contained in:
Gustas
2025-04-19 13:24:27 +03:00
committed by Paul Chote
parent 9da921756d
commit d4a08e5b58
4 changed files with 23 additions and 24 deletions

View File

@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Widgets
sealed class CopyPasteEditorAction : IEditorAction
{
[FluentReference("amount")]
[FluentReference("count")]
const string CopiedTiles = "notification-copied-tiles";
public string Text { get; }
@@ -131,7 +131,7 @@ namespace OpenRA.Mods.Common.Widgets
{
this.editorBlit = editorBlit;
Text = FluentProvider.GetMessage(CopiedTiles, "amount", editorBlit.TileCount());
Text = FluentProvider.GetMessage(CopiedTiles, "count", editorBlit.TileCount());
}
public void Execute()

View File

@@ -98,10 +98,10 @@ namespace OpenRA.Mods.Common.Widgets
sealed class PaintMarkerTileEditorAction : IEditorAction
{
[FluentReference("amount", "type")]
[FluentReference("count", "type")]
const string AddedMarkerTiles = "notification-added-marker-tiles";
[FluentReference("amount")]
[FluentReference("count")]
const string RemovedMarkerTiles = "notification-removed-marker-tiles";
public string Text { get; private set; }
@@ -150,16 +150,15 @@ namespace OpenRA.Mods.Common.Widgets
markerLayerOverlay.SetTile(cell, type);
}
if (type != null)
Text = FluentProvider.GetMessage(AddedMarkerTiles, "amount", paintTiles.Count, "type", type);
else
Text = FluentProvider.GetMessage(RemovedMarkerTiles, "amount", paintTiles.Count);
Text = type != null
? FluentProvider.GetMessage(AddedMarkerTiles, "count", paintTiles.Count, "type", type)
: FluentProvider.GetMessage(RemovedMarkerTiles, "count", paintTiles.Count);
}
}
sealed class ClearSelectedMarkerTilesEditorAction : IEditorAction
{
[FluentReference("amount", "type")]
[FluentReference("count", "type")]
const string ClearedSelectedMarkerTiles = "notification-cleared-selected-marker-tiles";
public string Text { get; }
@@ -177,7 +176,7 @@ namespace OpenRA.Mods.Common.Widgets
tiles = markerLayerOverlay.Tiles[tile].ToHashSet();
Text = FluentProvider.GetMessage(ClearedSelectedMarkerTiles, "amount", tiles.Count, "type", tile);
Text = FluentProvider.GetMessage(ClearedSelectedMarkerTiles, "count", tiles.Count, "type", tile);
}
public void Execute()
@@ -198,7 +197,7 @@ namespace OpenRA.Mods.Common.Widgets
sealed class ClearAllMarkerTilesEditorAction : IEditorAction
{
[FluentReference("amount")]
[FluentReference("count")]
const string ClearedAllMarkerTiles = "notification-cleared-all-marker-tiles";
public string Text { get; }
@@ -214,7 +213,7 @@ namespace OpenRA.Mods.Common.Widgets
var allTilesCount = tiles.Values.Sum(x => x.Count);
Text = FluentProvider.GetMessage(ClearedAllMarkerTiles, "amount", allTilesCount);
Text = FluentProvider.GetMessage(ClearedAllMarkerTiles, "count", allTilesCount);
}
public void Execute()

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.Widgets
sealed class AddResourcesEditorAction : IEditorAction
{
[FluentReference("amount", "type")]
[FluentReference("count", "type")]
const string AddedResource = "notification-added-resource";
public string Text { get; private set; }
@@ -157,7 +157,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.GetMessage(AddedResource, "amount", cellResources.Count, "type", resourceType);
Text = FluentProvider.GetMessage(AddedResource, "count", cellResources.Count, "type", resourceType);
}
}
}

View File

@@ -783,9 +783,9 @@ notification-added-actor = Added { $name } ({ $id })
## EditorCopyPasteBrush
notification-copied-tiles =
{ $amount ->
{ $count ->
[one] Copied one tile
*[other] Copied { $amount } tiles
*[other] Copied { $count } tiles
}
## EditorDefaultBrush
@@ -799,9 +799,9 @@ notification-moved-actor = Moved { $id } from { $x1 },{ $y1 } to { $x2 },{ $y2 }
## EditorResourceBrush
notification-added-resource =
{ $amount ->
{ $count ->
[one] Added one cell of { $type }
*[other] Added { $amount } cells of { $type }
*[other] Added { $count } cells of { $type }
}
## EditorTileBrush
@@ -810,17 +810,17 @@ notification-filled-tile = Filled with tile { $id }
## EditorMarkerLayerBrush
notification-added-marker-tiles =
{ $amount ->
{ $count ->
[one] Added one marker tile of type { $type }
*[other] Added { $amount } marker tiles of type { $type }
*[other] Added { $count } marker tiles of type { $type }
}
notification-removed-marker-tiles =
{ $amount ->
{ $count ->
[one] Removed one marker tile
*[other] Removed { $amount } marker tiles
*[other] Removed { $count } marker tiles
}
notification-cleared-selected-marker-tiles = Cleared { $amount } marker tiles of type { $type }
notification-cleared-all-marker-tiles = Cleared { $amount } marker tiles
notification-cleared-selected-marker-tiles = Cleared { $count } marker tiles of type { $type }
notification-cleared-all-marker-tiles = Cleared { $count } marker tiles
## EditorActionManager
notification-opened = Opened