diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs index 8502cd2712..8586049cb1 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs @@ -59,7 +59,7 @@ public sealed partial class PumpControl : BoxContainer foreach (var value in Enum.GetValues()) { - _pumpDirection.AddItem(Loc.GetString($"{value}"), (int) value); + _pumpDirection.AddItem(Loc.GetString($"air-alarm-ui-pump-direction-{value.ToString().ToLower()}"), (int) value); } _pumpDirection.SelectId((int) _data.PumpDirection); @@ -72,7 +72,7 @@ public sealed partial class PumpControl : BoxContainer foreach (var value in Enum.GetValues()) { - _pressureCheck.AddItem(Loc.GetString($"{value}"), (int) value); + _pressureCheck.AddItem(Loc.GetString($"air-alarm-ui-pressure-bound-{value.ToString().ToLower()}"), (int) value); } _pressureCheck.SelectId((int) _data.PressureChecks); diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml b/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml index 85f63731fb..c26aa2cf6e 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml +++ b/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml @@ -27,7 +27,7 @@ - + diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs index 6a233b8c3f..70da57df2e 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs @@ -1,15 +1,21 @@ using Content.Shared.Atmos; +using Content.Shared.Atmos.EntitySystems; using Content.Shared.Atmos.Monitor.Components; using Content.Shared.Atmos.Piping.Unary.Components; +using Content.Shared.Atmos.Prototypes; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Prototypes; namespace Content.Client.Atmos.Monitor.UI.Widgets; [GenerateTypedNameReferences] public sealed partial class ScrubberControl : BoxContainer { + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IEntityManager _entMan = default!; + private GasVentScrubberData _data; private string _address; @@ -30,6 +36,10 @@ public sealed partial class ScrubberControl : BoxContainer public ScrubberControl(GasVentScrubberData data, string address) { + + IoCManager.InjectDependencies(this); + var atmosphereSystem = _entMan.System(); + RobustXamlLoader.Load(this); Name = address; @@ -63,7 +73,7 @@ public sealed partial class ScrubberControl : BoxContainer foreach (var value in Enum.GetValues()) { - _pumpDirection.AddItem(Loc.GetString($"{value}"), (int) value); + _pumpDirection.AddItem(Loc.GetString($"air-alarm-ui-pump-direction-{value.ToString().ToLower()}"), (int) value); } _pumpDirection.SelectId((int) _data.PumpDirection); @@ -95,10 +105,13 @@ public sealed partial class ScrubberControl : BoxContainer foreach (var value in allGases) { + ProtoId gasProtoId = atmosphereSystem.GetGas(value); + var gasName = _prototypeManager.Index(gasProtoId).Name; + var gasButton = new Button { Name = value.ToString(), - Text = Loc.GetString($"{value}"), + Text = Loc.GetString(gasName), ToggleMode = true, HorizontalExpand = true, Pressed = _data.FilterGases.Contains(value) diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs index 9e88b0bff4..d9945b1acc 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs @@ -1,16 +1,22 @@ using Content.Client.Message; using Content.Shared.Atmos; +using Content.Shared.Atmos.EntitySystems; using Content.Shared.Atmos.Monitor; +using Content.Shared.Atmos.Prototypes; using Content.Shared.Temperature; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Prototypes; namespace Content.Client.Atmos.Monitor.UI.Widgets; [GenerateTypedNameReferences] public sealed partial class SensorInfo : BoxContainer { + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IEntityManager _entMan = default!; + public Action? OnThresholdUpdate; public event Action? SensorDataCopied; private string _address; @@ -23,6 +29,9 @@ public sealed partial class SensorInfo : BoxContainer public SensorInfo(AtmosSensorData data, string address) { + IoCManager.InjectDependencies(this); + var atmosphereSystem = _entMan.System(); + RobustXamlLoader.Load(this); _address = address; @@ -45,8 +54,12 @@ public sealed partial class SensorInfo : BoxContainer var label = new RichTextLabel(); var fractionGas = amount / data.TotalMoles; + + ProtoId gasProtoId = atmosphereSystem.GetGas(gas); + var gasName = _prototypeManager.Index(gasProtoId).Name; + label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator", - ("gas", $"{gas}"), + ("gas", Loc.GetString(gasName)), ("color", AirAlarmWindow.ColorForThreshold(fractionGas, data.GasThresholds[gas])), ("amount", $"{amount:0.####}"), ("percentage", $"{(100 * fractionGas):0.##}"))); @@ -54,7 +67,7 @@ public sealed partial class SensorInfo : BoxContainer _gasLabels.Add(gas, label); var threshold = data.GasThresholds[gas]; - var gasThresholdControl = new ThresholdControl(Loc.GetString($"air-alarm-ui-thresholds-gas-title", ("gas", $"{gas}")), threshold, AtmosMonitorThresholdType.Gas, gas, 100); + var gasThresholdControl = new ThresholdControl(Loc.GetString($"air-alarm-ui-thresholds-gas-title"), threshold, AtmosMonitorThresholdType.Gas, gas, 100); gasThresholdControl.Margin = new Thickness(20, 2, 2, 2); gasThresholdControl.ThresholdDataChanged += (type, alarmThreshold, arg3) => { @@ -90,6 +103,9 @@ public sealed partial class SensorInfo : BoxContainer public void ChangeData(AtmosSensorData data) { + IoCManager.InjectDependencies(this); + var atmosphereSystem = _entMan.System(); + SensorAddress.Title = Loc.GetString("air-alarm-ui-window-listing-title", ("address", _address), ("state", data.AlarmState)); AlarmStateLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-alarm-state-indicator", @@ -112,8 +128,12 @@ public sealed partial class SensorInfo : BoxContainer } var fractionGas = amount / data.TotalMoles; + + ProtoId gasProtoId = atmosphereSystem.GetGas(gas); + var gasName = _prototypeManager.Index(gasProtoId).Name; + label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator", - ("gas", $"{gas}"), + ("gas", Loc.GetString(gasName)), ("color", AirAlarmWindow.ColorForThreshold(fractionGas, data.GasThresholds[gas])), ("amount", $"{amount:0.####}"), ("percentage", $"{(100 * fractionGas):0.##}"))); diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml index 0d5e741d0f..7ce21fdd78 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml +++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml @@ -2,6 +2,6 @@ HorizontalExpand="True" Orientation="Vertical" Margin = "20 0 0 0" MinSize="160 0" > diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml index 635a70f532..76fc1621ab 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml +++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml @@ -6,7 +6,7 @@ - + diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index 12eb7ffc23..d95cb5bb8c 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -1020,7 +1020,7 @@ namespace Content.Client.Lobby.UI _loadoutWindow = new LoadoutWindow(Profile, roleLoadout, roleLoadoutProto, _playerManager.LocalSession, collection) { - Title = jobProto?.ID + "-loadout", + Title = Loc.GetString("loadout-window-title-loadout", ("job", $"{jobProto?.LocalizedName}")), }; // Refresh the buttons etc. diff --git a/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml b/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml index 469faf209d..da0b9f60d8 100644 --- a/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml +++ b/Content.Client/NetworkConfigurator/NetworkConfiguratorConfigurationMenu.xaml @@ -5,15 +5,15 @@ -