Localise text notifications.

This commit is contained in:
Matthias Mailänder
2022-10-19 12:20:25 +02:00
committed by abcdefg30
parent c041ea7d39
commit 44aaf4dd07
6 changed files with 47 additions and 8 deletions

View File

@@ -106,6 +106,9 @@ namespace OpenRA.Mods.Common.Traits
bool enableAll;
[TranslationReference("cheat", "player", "suffix")]
static readonly string CheatUsed = "cheat-used";
public DeveloperMode(DeveloperModeInfo info)
{
this.info = info;
@@ -273,7 +276,8 @@ namespace OpenRA.Mods.Common.Traits
return;
}
TextNotificationsManager.Debug("Cheat used: {0} by {1}{2}", order.OrderString, self.Owner.PlayerName, debugSuffix);
var arguments = Translation.Arguments("cheat", order.OrderString, "player", self.Owner.PlayerName, "suffix", debugSuffix);
TextNotificationsManager.Debug(Game.ModData.Translation.GetString(CheatUsed, arguments));
}
bool IUnlocksRenderPlayer.RenderPlayerUnlocked => Enabled;