Removed old Loc.GetString() use instances (#4155)

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Galactic Chimp
2021-06-21 02:13:54 +02:00
committed by GitHub
parent 4a46fbe6dd
commit 392b820796
523 changed files with 3082 additions and 1551 deletions

View File

@@ -663,20 +663,20 @@ namespace Content.Server.Disposal.Mailing
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("You can't do that!"));
Owner.PopupMessage(eventArgs.User, Loc.GetString("disposal-mailing-unit-is-valid-interaction-cannot-interact"));
return false;
}
if (eventArgs.User.IsInContainer())
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("You can't reach there!"));
Owner.PopupMessage(eventArgs.User, Loc.GetString("disposal-mailing-unit-is-valid-interaction-cannot-reach"));
return false;
}
// This popup message doesn't appear on clicks, even when code was seperate. Unsure why.
if (!eventArgs.User.HasComponent<IHandsComponent>())
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("You have no hands!"));
Owner.PopupMessage(eventArgs.User, Loc.GetString("disposal-mailing-unit-is-valid-interaction-no-hands"));
return false;
}
@@ -755,7 +755,7 @@ namespace Content.Server.Disposal.Mailing
}
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Jump inside");
data.Text = Loc.GetString("self-insert-verb-get-data-text");
}
protected override void Activate(IEntity user, DisposalMailingUnitComponent component)
@@ -778,7 +778,7 @@ namespace Content.Server.Disposal.Mailing
}
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Flush");
data.Text = Loc.GetString("flush-verb-get-data-text");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png";
}

View File

@@ -166,7 +166,7 @@ namespace Content.Server.Disposal.Tube.Components
if (!args.User.TryGetComponent(out IHandsComponent? hands))
{
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
Owner.PopupMessage(args.User, Loc.GetString("disposal-router-window-tag-input-activate-no-hands"));
return;
}
@@ -202,7 +202,7 @@ namespace Content.Server.Disposal.Tube.Components
return;
}
data.Text = Loc.GetString("Open Configuration");
data.Text = Loc.GetString("configure-verb-get-data-text");
data.IconTexture = "/Textures/Interface/VerbIcons/settings.svg.192dpi.png";
}

View File

@@ -132,7 +132,7 @@ namespace Content.Server.Disposal.Tube.Components
if (!args.User.TryGetComponent(out IHandsComponent? hands))
{
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
Owner.PopupMessage(args.User, Loc.GetString("disposal-tagger-window-activate-no-hands"));
return;
}
@@ -162,7 +162,7 @@ namespace Content.Server.Disposal.Tube.Components
return;
}
data.Text = Loc.GetString("Open Configuration");
data.Text = Loc.GetString("configure-verb-get-data-text");
data.IconTexture = "/Textures/Interface/VerbIcons/settings.svg.192dpi.png";
}

View File

@@ -176,7 +176,7 @@ namespace Content.Server.Disposal.Tube.Components
{
var directions = string.Join(", ", ConnectableDirections());
Owner.PopupMessage(entity, Loc.GetString("{0}", directions));
Owner.PopupMessage(entity, Loc.GetString("disposal-tube-component-popup-directions-text", ("directions", directions)));
}
private void UpdateVisualState()
@@ -283,7 +283,7 @@ namespace Content.Server.Disposal.Tube.Components
{
protected override void GetData(IEntity user, IDisposalTubeComponent component, VerbData data)
{
data.Text = Loc.GetString("Tube Directions");
data.Text = Loc.GetString("tube-direction-verb-get-data-text");
data.CategoryData = VerbCategories.Debug;
data.Visibility = VerbVisibility.Invisible;

View File

@@ -14,15 +14,15 @@ namespace Content.Server.Disposal
public class TubeConnectionsCommand : IConsoleCommand
{
public string Command => "tubeconnections";
public string Description => Loc.GetString("Shows all the directions that a tube can connect in.");
public string Help => $"Usage: {Command} <entityUid>";
public string Description => Loc.GetString("tube-connections-command-description");
public string Help => Loc.GetString("tube-connections-command-help-text", ("command", Command));
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player as IPlayerSession;
if (player?.AttachedEntity == null)
{
shell.WriteLine(Loc.GetString("Only players can use this command"));
shell.WriteLine(Loc.GetString("shell-only-players-can-run-this-command"));
return;
}
@@ -34,20 +34,22 @@ namespace Content.Server.Disposal
if (!EntityUid.TryParse(args[0], out var id))
{
shell.WriteLine(Loc.GetString("{0} isn't a valid entity uid", args[0]));
shell.WriteLine(Loc.GetString("shell-invalid-entity-uid",("uid", args[0])));
return;
}
var entityManager = IoCManager.Resolve<IEntityManager>();
if (!entityManager.TryGetEntity(id, out var entity))
{
shell.WriteLine(Loc.GetString("No entity exists with uid {0}", id));
shell.WriteLine(Loc.GetString("shell-could-not-find-entity-with-uid",("uid", id)));
return;
}
if (!entity.TryGetComponent(out IDisposalTubeComponent? tube))
{
shell.WriteLine(Loc.GetString("Entity with uid {0} doesn't have a {1} component", id, nameof(IDisposalTubeComponent)));
shell.WriteLine(Loc.GetString("shell-entity-with-uid-lacks-component",
("uid", id),
("componentName", nameof(IDisposalTubeComponent))));
return;
}

View File

@@ -507,7 +507,7 @@ namespace Content.Server.Disposal.Unit.Components
if(!Owner.HasComponent<AnchorableComponent>())
{
Logger.WarningS("VitalComponentMissing", $"Disposal unit {Owner.Uid} is missing an anchorable component");
Logger.WarningS("VitalComponentMissing", $"Disposal unit {Owner.Uid} is missing an {nameof(AnchorableComponent)}");
}
UpdateVisualState();
@@ -559,20 +559,20 @@ namespace Content.Server.Disposal.Unit.Components
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("You can't do that!"));
Owner.PopupMessage(eventArgs.User, Loc.GetString("ui-disposal-unit-is-valid-interaction-cannot=interact"));
return false;
}
if (eventArgs.User.IsInContainer())
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("You can't reach there!"));
Owner.PopupMessage(eventArgs.User, Loc.GetString("ui-disposal-unit-is-valid-interaction-cannot-reach"));
return false;
}
// This popup message doesn't appear on clicks, even when code was seperate. Unsure why.
if (!eventArgs.User.HasComponent<IHandsComponent>())
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("You have no hands!"));
Owner.PopupMessage(eventArgs.User, Loc.GetString("ui-disposal-unit-is-valid-interaction-no-hands"));
return false;
}
@@ -657,7 +657,7 @@ namespace Content.Server.Disposal.Unit.Components
}
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Jump inside");
data.Text = Loc.GetString("self-insert-verb-get-data-text");
}
protected override void Activate(IEntity user, DisposalUnitComponent component)
@@ -680,7 +680,7 @@ namespace Content.Server.Disposal.Unit.Components
}
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Flush");
data.Text = Loc.GetString("flush-verb-get-data-text");
data.IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png";
}