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