Set up English translation for requires/on-hold/ready texts
This commit is contained in:
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
nameLabel.GetText = () => tooltip.Name;
|
||||
|
||||
var prereqs = buildable.Prerequisites.Select(a => ActorName(a));
|
||||
var requiresString = prereqs.Any() ? "Requires {0}".F(prereqs.JoinWith(", ")) : "";
|
||||
var requiresString = prereqs.Any() ? requiresLabel.Text.F(prereqs.JoinWith(", ")) : "";
|
||||
requiresLabel.GetText = () => requiresString;
|
||||
|
||||
var power = bi != null ? bi.Power : 0;
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
public readonly string TooltipContainer;
|
||||
public readonly string TooltipTemplate = "PRODUCTION_TOOLTIP";
|
||||
|
||||
public readonly string ReadyText = "";
|
||||
public readonly string HoldText = "";
|
||||
[Translate] public readonly string ReadyText = "";
|
||||
[Translate] public readonly string HoldText = "";
|
||||
|
||||
public string TooltipActor { get; private set; }
|
||||
public readonly World World;
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
public int Columns = 3;
|
||||
public int Rows = 5;
|
||||
|
||||
public string ReadyText = "";
|
||||
public string HoldText = "";
|
||||
public string RequiresText = "";
|
||||
[Translate] public string ReadyText = "";
|
||||
[Translate] public string HoldText = "";
|
||||
[Translate] public string RequiresText = "";
|
||||
|
||||
public int IconWidth = 64;
|
||||
public int IconHeight = 48;
|
||||
@@ -484,7 +484,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
var prereqs = buildable.Prerequisites.Select(Description);
|
||||
if (prereqs.Any())
|
||||
{
|
||||
Game.Renderer.Fonts["Regular"].DrawText("{0} {1}".F(RequiresText, prereqs.JoinWith(", ")), p.ToInt2(), Color.White);
|
||||
Game.Renderer.Fonts["Regular"].DrawText(RequiresText.F(prereqs.JoinWith(", ")), p.ToInt2(), Color.White);
|
||||
|
||||
p += new int2(0, 8);
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ Container@PLAYER_WIDGETS:
|
||||
X:WINDOW_RIGHT - 204
|
||||
Y:287
|
||||
TooltipContainer:TOOLTIP_CONTAINER
|
||||
ReadyText:Ready
|
||||
HoldText:On Hold
|
||||
ReadyText:@ready@
|
||||
HoldText:@on-hold@
|
||||
Background@FMVPLAYER:
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
|
||||
@@ -60,6 +60,7 @@ Background@PRODUCTION_TOOLTIP:
|
||||
Y:19
|
||||
Height:23
|
||||
Font:TinyBold
|
||||
Text:@requires@
|
||||
Label@DESC:
|
||||
X:5
|
||||
Y:39
|
||||
|
||||
6
mods/cnc/languages/english.yaml
Normal file
6
mods/cnc/languages/english.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
english:
|
||||
english: English
|
||||
|
||||
ready: Ready
|
||||
on-hold: On Hold
|
||||
requires: Requires {0}
|
||||
@@ -94,6 +94,9 @@ Movies:
|
||||
mods/cnc/movies-gdi.yaml
|
||||
mods/cnc/movies-nod.yaml
|
||||
|
||||
Translations:
|
||||
mods/cnc/languages/english.yaml
|
||||
|
||||
Voices:
|
||||
mods/cnc/voices.yaml
|
||||
|
||||
|
||||
@@ -155,9 +155,9 @@ Container@PLAYER_WIDGETS:
|
||||
Y:280
|
||||
Width:238
|
||||
Height:500
|
||||
ReadyText: READY
|
||||
HoldText: ON HOLD
|
||||
RequiresText: Requires
|
||||
ReadyText:@ready@
|
||||
HoldText:@on-hold@
|
||||
RequiresText:@requires@
|
||||
IconWidth: 60
|
||||
IconHeight: 48
|
||||
Columns: 3
|
||||
|
||||
6
mods/d2k/languages/english.yaml
Normal file
6
mods/d2k/languages/english.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
english:
|
||||
english: English
|
||||
|
||||
ready: READY
|
||||
on-hold: ON HOLD
|
||||
requires: Requires {0}
|
||||
@@ -93,6 +93,9 @@ Music:
|
||||
|
||||
Movies:
|
||||
|
||||
Translations:
|
||||
mods/d2k/languages/english.yaml
|
||||
|
||||
LoadScreen: DefaultLoadScreen
|
||||
Image: mods/d2k/uibits/loadscreen.png
|
||||
InstallerMenuWidget: INSTALL_PANEL
|
||||
|
||||
@@ -148,16 +148,16 @@ Container@PLAYER_WIDGETS:
|
||||
SupportPowerBin@INGAME_POWERS_BIN:
|
||||
X:0
|
||||
Y:25
|
||||
ReadyText: READY
|
||||
HoldText: ON HOLD
|
||||
ReadyText: @ready@
|
||||
HoldText: @on-hold@
|
||||
BuildPalette@INGAME_BUILD_PALETTE:
|
||||
X:WINDOW_RIGHT - 250
|
||||
Y:280
|
||||
Width:250
|
||||
Height:500
|
||||
ReadyText: READY
|
||||
HoldText: ON HOLD
|
||||
RequiresText: Requires
|
||||
ReadyText: @ready@
|
||||
HoldText: @on-hold@
|
||||
RequiresText: @requires@
|
||||
|
||||
Container@OBSERVER_WIDGETS:
|
||||
Children:
|
||||
|
||||
6
mods/ra/languages/english.yaml
Normal file
6
mods/ra/languages/english.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
english:
|
||||
english: English
|
||||
|
||||
ready: READY
|
||||
on-hold: ON HOLD
|
||||
requires: Requires {0}
|
||||
@@ -111,6 +111,9 @@ Movies:
|
||||
mods/ra/movies1.yaml
|
||||
mods/ra/movies2.yaml
|
||||
|
||||
Translations:
|
||||
mods/ra/languages/english.yaml
|
||||
|
||||
LoadScreen: DefaultLoadScreen
|
||||
Image: mods/ra/uibits/loadscreen.png
|
||||
InstallerMenuWidget: INSTALL_PANEL
|
||||
|
||||
6
mods/ts/languages/english.yaml
Normal file
6
mods/ts/languages/english.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
english:
|
||||
english: English
|
||||
|
||||
ready: READY
|
||||
on-hold: ON HOLD
|
||||
requires: Requires {0}
|
||||
@@ -134,6 +134,9 @@ Music:
|
||||
|
||||
Movies:
|
||||
|
||||
Translations:
|
||||
mods/ts/languages/english.yaml
|
||||
|
||||
LoadScreen: DefaultLoadScreen
|
||||
Image: mods/ts/uibits/loadscreen.png
|
||||
InstallerMenuWidget: INSTALL_PANEL
|
||||
|
||||
Reference in New Issue
Block a user