Extract editor brush texts.

This commit is contained in:
Matthias Mailänder
2023-05-20 19:55:17 +02:00
committed by abcdefg30
parent 8433bc0948
commit c9dddc342c
8 changed files with 69 additions and 11 deletions

View File

@@ -81,6 +81,9 @@ namespace OpenRA.Mods.Common.Widgets
{
public string Text { get; private set; }
[TranslationReference("name", "id")]
const string AddedActor = "notification-added-actor";
readonly EditorActorLayer editorLayer;
readonly ActorReference actor;
@@ -102,7 +105,8 @@ namespace OpenRA.Mods.Common.Widgets
public void Do()
{
editorActorPreview = editorLayer.Add(actor);
Text = $"Added {editorActorPreview.Info.Name} ({editorActorPreview.ID})";
Text = TranslationProvider.GetString(AddedActor,
Translation.Arguments("name", editorActorPreview.Info.Name, "id", editorActorPreview.ID));
}
public void Undo()