Extract strings from support power name and description.
This commit is contained in:
committed by
Gustas
parent
0c43801a2c
commit
188f0e2451
@@ -21,8 +21,10 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
public class SupportPowerTimerWidget : Widget
|
||||
{
|
||||
[TranslationReference("player", "support-power", "time")]
|
||||
const string Format = "support-power-timer";
|
||||
|
||||
public readonly string Font = "Bold";
|
||||
public readonly string Format = "{0}'s {1}: {2}";
|
||||
public readonly TextAlign Align = TextAlign.Left;
|
||||
public readonly TimerOrder Order = TimerOrder.Descending;
|
||||
|
||||
@@ -57,7 +59,9 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
var self = p.Instances[0].Self;
|
||||
var time = WidgetUtils.FormatTime(p.RemainingTicks, false, self.World.Timestep);
|
||||
var text = Format.FormatCurrent(self.Owner.PlayerName, p.Info.Name, time);
|
||||
var supportPowerName = TranslationProvider.GetString(p.Info.Name);
|
||||
var text = TranslationProvider.GetString(Format, Translation.Arguments("player", self.Owner.PlayerName, "support-power", supportPowerName, "time", time));
|
||||
|
||||
var playerColor = self.Owner.Color;
|
||||
|
||||
if (Game.Settings.Game.UsePlayerStanceColors)
|
||||
|
||||
Reference in New Issue
Block a user