Remove vestigial translation plumbing.

This was never completed to the level required to
be properly used ingame.
This commit is contained in:
Paul Chote
2020-12-24 17:51:09 +00:00
committed by Matthias Mailänder
parent fb20479379
commit 6e7ad9df25
39 changed files with 1 additions and 254 deletions

View File

@@ -26,7 +26,6 @@ namespace OpenRA.Mods.Common.Widgets
public bool DisableKeyRepeat = false;
public bool DisableKeySound = false;
[Translate]
public string Text = "";
public TextAlign Align = TextAlign.Center;
public int LeftMargin = 5;
@@ -58,11 +57,9 @@ namespace OpenRA.Mods.Common.Widgets
protected Lazy<TooltipContainerWidget> tooltipContainer;
[Translate]
public string TooltipText;
public Func<string> GetTooltipText;
[Translate]
public string TooltipDesc;
public Func<string> GetTooltipDesc;

View File

@@ -26,7 +26,6 @@ namespace OpenRA.Mods.Common.Widgets
public Func<string> GetImageName;
public Func<string> GetImageCollection;
[Translate]
public string TooltipText;
Lazy<TooltipContainerWidget> tooltipContainer;

View File

@@ -21,7 +21,6 @@ namespace OpenRA.Mods.Common.Widgets
public class LabelWidget : Widget
{
[Translate]
public string Text = null;
public TextAlign Align = TextAlign.Left;
public TextVAlign VAlign = TextVAlign.Middle;

View File

@@ -247,13 +247,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
BindIntSliderPref(panel, "FRAME_LIMIT_SLIDER", ds, "MaxFramerate");
BindCheckboxPref(panel, "PLAYER_STANCE_COLORS_CHECKBOX", gs, "UsePlayerStanceColors");
var languageDropDownButton = panel.GetOrNull<DropDownButtonWidget>("LANGUAGE_DROPDOWNBUTTON");
if (languageDropDownButton != null)
{
languageDropDownButton.OnMouseDown = _ => ShowLanguageDropdown(languageDropDownButton, modData.Languages);
languageDropDownButton.GetText = () => FieldLoader.Translate(ds.Language);
}
var windowModeDropdown = panel.Get<DropDownButtonWidget>("MODE_DROPDOWN");
windowModeDropdown.OnMouseDown = _ => ShowWindowModeDropdown(windowModeDropdown, ds);
windowModeDropdown.GetText = () => ds.Mode == WindowMode.Windowed ?
@@ -388,7 +381,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
ds.CapFramerate = dds.CapFramerate;
ds.MaxFramerate = dds.MaxFramerate;
ds.Language = dds.Language;
ds.GLProfile = dds.GLProfile;
ds.Mode = dds.Mode;
ds.VideoDisplay = dds.VideoDisplay;
@@ -828,21 +820,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 500, options.Keys, setupItem);
}
static void ShowLanguageDropdown(DropDownButtonWidget dropdown, IEnumerable<string> languages)
{
Func<string, ScrollItemWidget, ScrollItemWidget> setupItem = (o, itemTemplate) =>
{
var item = ScrollItemWidget.Setup(itemTemplate,
() => Game.Settings.Graphics.Language == o,
() => Game.Settings.Graphics.Language = o);
item.Get<LabelWidget>("LABEL").GetText = () => FieldLoader.Translate(o);
return item;
};
dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 500, languages, setupItem);
}
static void ShowStatusBarsDropdown(DropDownButtonWidget dropdown, GameSettings s)
{
var options = new Dictionary<string, StatusBarsType>()

View File

@@ -70,13 +70,10 @@ namespace OpenRA.Mods.Common.Widgets
public readonly bool DrawTime = true;
[Translate]
public readonly string ReadyText = "";
[Translate]
public readonly string HoldText = "";
[Translate]
public readonly string InfiniteSymbol = "\u221E";
public int DisplayedIconCount { get; private set; }

View File

@@ -22,10 +22,8 @@ namespace OpenRA.Mods.Common.Widgets
{
public class SupportPowersWidget : Widget
{
[Translate]
public readonly string ReadyText = "";
[Translate]
public readonly string HoldText = "";
public readonly string OverlayFont = "TinyBold";