diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs index 632f7eb0b9..ddf6fbe8dd 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/ProductionTooltipLogic.cs @@ -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; diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs index 3d174acd16..8dea9c77eb 100755 --- a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs @@ -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; diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs index 30402a14ef..a18a7fb18d 100755 --- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs @@ -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); } diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 1397667cee..efc272c8c2 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -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 diff --git a/mods/cnc/chrome/tooltips.yaml b/mods/cnc/chrome/tooltips.yaml index 9531f7d3e9..215e2ec11f 100644 --- a/mods/cnc/chrome/tooltips.yaml +++ b/mods/cnc/chrome/tooltips.yaml @@ -60,6 +60,7 @@ Background@PRODUCTION_TOOLTIP: Y:19 Height:23 Font:TinyBold + Text:@requires@ Label@DESC: X:5 Y:39 diff --git a/mods/cnc/languages/english.yaml b/mods/cnc/languages/english.yaml new file mode 100644 index 0000000000..e3e78412b8 --- /dev/null +++ b/mods/cnc/languages/english.yaml @@ -0,0 +1,6 @@ +english: + english: English + + ready: Ready + on-hold: On Hold + requires: Requires {0} diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index a3976513fa..f0bb0f9f31 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -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 diff --git a/mods/d2k/chrome/ingame.yaml b/mods/d2k/chrome/ingame.yaml index 96e19730c9..3d1dd5e046 100644 --- a/mods/d2k/chrome/ingame.yaml +++ b/mods/d2k/chrome/ingame.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 diff --git a/mods/d2k/languages/english.yaml b/mods/d2k/languages/english.yaml new file mode 100644 index 0000000000..7eba7d3299 --- /dev/null +++ b/mods/d2k/languages/english.yaml @@ -0,0 +1,6 @@ +english: + english: English + + ready: READY + on-hold: ON HOLD + requires: Requires {0} diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 631bdc5162..df4f1dbb31 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -93,6 +93,9 @@ Music: Movies: +Translations: + mods/d2k/languages/english.yaml + LoadScreen: DefaultLoadScreen Image: mods/d2k/uibits/loadscreen.png InstallerMenuWidget: INSTALL_PANEL diff --git a/mods/ra/chrome/ingame.yaml b/mods/ra/chrome/ingame.yaml index afc3e46fa9..21280cc850 100644 --- a/mods/ra/chrome/ingame.yaml +++ b/mods/ra/chrome/ingame.yaml @@ -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: diff --git a/mods/ra/languages/english.yaml b/mods/ra/languages/english.yaml new file mode 100644 index 0000000000..7eba7d3299 --- /dev/null +++ b/mods/ra/languages/english.yaml @@ -0,0 +1,6 @@ +english: + english: English + + ready: READY + on-hold: ON HOLD + requires: Requires {0} diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index dfc6dda6e3..230f0fcea8 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -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 diff --git a/mods/ts/languages/english.yaml b/mods/ts/languages/english.yaml new file mode 100644 index 0000000000..7eba7d3299 --- /dev/null +++ b/mods/ts/languages/english.yaml @@ -0,0 +1,6 @@ +english: + english: English + + ready: READY + on-hold: ON HOLD + requires: Requires {0} diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 774f9af256..bfb91323ad 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -134,6 +134,9 @@ Music: Movies: +Translations: + mods/ts/languages/english.yaml + LoadScreen: DefaultLoadScreen Image: mods/ts/uibits/loadscreen.png InstallerMenuWidget: INSTALL_PANEL