Add missing localization to verb names (#1953)
This commit is contained in:
@@ -234,7 +234,10 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
var heldEntityName = hands.GetActiveHand.Owner?.Prototype?.Name ?? "<Item>";
|
||||
var myName = component.Owner.Prototype?.Name ?? "<Item>";
|
||||
|
||||
data.Text= $"Transfer liquid from [{heldEntityName}] to [{myName}].";
|
||||
var locHeldEntityName = Loc.GetString(heldEntityName);
|
||||
var locMyName = Loc.GetString(myName);
|
||||
|
||||
data.Text = Loc.GetString("Transfer liquid from [{0}] to [{1}].", locHeldEntityName, locMyName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -334,7 +337,10 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
var heldEntityName = hands.GetActiveHand.Owner?.Prototype?.Name ?? "<Item>";
|
||||
var myName = component.Owner.Prototype?.Name ?? "<Item>";
|
||||
|
||||
data.Text = $"Transfer liquid from [{myName}] to [{heldEntityName}].";
|
||||
var locHeldEntityName = Loc.GetString(heldEntityName);
|
||||
var locMyName = Loc.GetString(myName);
|
||||
|
||||
data.Text = Loc.GetString("Transfer liquid from [{0}] to [{1}].", locMyName, locHeldEntityName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
{
|
||||
protected override void GetData(IEntity user, IDisposalTubeComponent component, VerbData data)
|
||||
{
|
||||
data.Text = "Tube Directions";
|
||||
data.Text = Loc.GetString("Tube Directions");
|
||||
data.CategoryData = VerbCategories.Debug;
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Verbs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Fluids
|
||||
{
|
||||
@@ -28,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = "Spill liquid";
|
||||
data.Text = Loc.GetString("Spill liquid");
|
||||
data.Visibility = solutionComponent.CurrentVolume > ReagentUnit.Zero
|
||||
? VerbVisibility.Visible
|
||||
: VerbVisibility.Disabled;
|
||||
|
||||
@@ -273,12 +273,12 @@ namespace Content.Server.GameObjects.Components.Interactable
|
||||
|
||||
if (component.Cell == null)
|
||||
{
|
||||
data.Text = "Eject cell (cell missing)";
|
||||
data.Text = Loc.GetString("Eject cell (cell missing)");
|
||||
data.Visibility = VerbVisibility.Disabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Text = "Eject cell";
|
||||
data.Text = Loc.GetString("Eject cell");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = component.Open ? "Close" : "Open";
|
||||
data.Text = Loc.GetString(component.Open ? "Close" : "Open");
|
||||
}
|
||||
|
||||
void IExAct.OnExplosion(ExplosionEventArgs eventArgs)
|
||||
|
||||
@@ -15,6 +15,7 @@ using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
@@ -122,7 +123,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = "Pick Up";
|
||||
data.Text = Loc.GetString("Pick Up");
|
||||
}
|
||||
|
||||
protected override void Activate(IEntity user, ItemComponent component)
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = component.Locked ? Loc.GetString("Unlock") : Loc.GetString("Lock");
|
||||
data.Text = Loc.GetString(component.Locked ? "Unlock" : "Lock");
|
||||
}
|
||||
|
||||
protected override void Activate(IEntity user, SecureEntityStorageComponent component)
|
||||
|
||||
@@ -137,11 +137,13 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
||||
if (component._container.ContainedEntity != null || handsComponent.GetActiveHand == null)
|
||||
{
|
||||
data.Visibility = VerbVisibility.Disabled;
|
||||
data.Text = "Insert";
|
||||
data.Text = Loc.GetString("Insert");
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = $"Insert {handsComponent.GetActiveHand.Owner.Name}";
|
||||
var heldItemName = Loc.GetString(handsComponent.GetActiveHand.Owner.Name);
|
||||
|
||||
data.Text = Loc.GetString("Insert {0}", heldItemName);
|
||||
}
|
||||
|
||||
protected override void Activate(IEntity user, BaseCharger component)
|
||||
@@ -173,12 +175,14 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
||||
}
|
||||
if (component._container.ContainedEntity == null)
|
||||
{
|
||||
data.Text = "Eject";
|
||||
data.Text = Loc.GetString("Eject");
|
||||
data.Visibility = VerbVisibility.Disabled;
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = $"Eject {component._container.ContainedEntity.Name}";
|
||||
var containerItemName = Loc.GetString(component._container.ContainedEntity.Name);
|
||||
|
||||
data.Text = Loc.GetString("Eject {0}", containerItemName);
|
||||
}
|
||||
|
||||
protected override void Activate(IEntity user, BaseCharger component)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Content.Server.GameObjects.Components.Rotatable
|
||||
}
|
||||
|
||||
data.CategoryData = VerbCategories.Rotate;
|
||||
data.Text = "Rotate clockwise";
|
||||
data.Text = Loc.GetString("Rotate clockwise");
|
||||
data.IconTexture = "/Textures/Interface/VerbIcons/rotate_cw.svg.96dpi.png";
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Content.Server.GameObjects.Components.Rotatable
|
||||
}
|
||||
|
||||
data.CategoryData = VerbCategories.Rotate;
|
||||
data.Text = "Rotate counter-clockwise";
|
||||
data.Text = Loc.GetString("Rotate counter-clockwise");
|
||||
data.IconTexture = "/Textures/Interface/VerbIcons/rotate_ccw.svg.96dpi.png";
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace Content.Server.GameObjects.Components.Strap
|
||||
}
|
||||
|
||||
data.Visibility = VerbVisibility.Visible;
|
||||
data.Text = buckle.BuckledTo == null ? Loc.GetString("Buckle") : Loc.GetString("Unbuckle");
|
||||
data.Text = Loc.GetString(buckle.BuckledTo == null ? "Buckle" : "Unbuckle");
|
||||
}
|
||||
|
||||
protected override void Activate(IEntity user, StrapComponent component)
|
||||
|
||||
@@ -269,12 +269,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
|
||||
if (component.Cell == null)
|
||||
{
|
||||
data.Text = "Eject cell (cell missing)";
|
||||
data.Text = Loc.GetString("Eject cell (cell missing)");
|
||||
data.Visibility = VerbVisibility.Disabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Text = "Eject cell";
|
||||
data.Text = Loc.GetString("Eject cell");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -302,12 +303,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
||||
|
||||
if (component.PowerCell == null)
|
||||
{
|
||||
data.Text = "Eject cell (cell missing)";
|
||||
data.Text = Loc.GetString("Eject cell (cell missing)");
|
||||
data.Visibility = VerbVisibility.Disabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Text = "Eject cell";
|
||||
data.Text = Loc.GetString("Eject cell");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Robust.Server.Console;
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.GlobalVerbs
|
||||
{
|
||||
@@ -35,7 +36,7 @@ namespace Content.Server.GlobalVerbs
|
||||
if (groupController.CanCommand(player.playerSession, "controlmob"))
|
||||
{
|
||||
data.Visibility = VerbVisibility.Visible;
|
||||
data.Text = "Control Mob";
|
||||
data.Text = Loc.GetString("Control Mob");
|
||||
data.CategoryData = VerbCategories.Debug;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using Robust.Server.Console;
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.GlobalVerbs
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace Content.Server.GlobalVerbs
|
||||
|
||||
public override void GetData(IEntity user, IEntity target, VerbData data)
|
||||
{
|
||||
data.Text = "Rejuvenate";
|
||||
data.Text = Loc.GetString("Rejuvenate");
|
||||
data.CategoryData = VerbCategories.Debug;
|
||||
data.Visibility = VerbVisibility.Invisible;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user