Fix some locale strings and make some code for them looks better (#32003)

* Fix a lot locale strings

add functions using
fix identity for meat spike and creaming

* comma

* fixes for fixes

* yeah

* fuck
This commit is contained in:
lzk
2025-04-21 22:15:20 +02:00
committed by GitHub
parent ded94ebc3d
commit 9e39f99a92
9 changed files with 47 additions and 21 deletions

View File

@@ -74,10 +74,13 @@ namespace Content.Server.Kitchen.EntitySystems
return; return;
_suicide.ApplyLethalDamage((args.Victim, damageableComponent), "Piercing"); _suicide.ApplyLethalDamage((args.Victim, damageableComponent), "Piercing");
var othersMessage = Loc.GetString("comp-kitchen-spike-suicide-other", ("victim", args.Victim)); var othersMessage = Loc.GetString("comp-kitchen-spike-suicide-other",
("victim", Identity.Entity(args.Victim, EntityManager)),
("this", entity));
_popupSystem.PopupEntity(othersMessage, args.Victim, Filter.PvsExcept(args.Victim), true); _popupSystem.PopupEntity(othersMessage, args.Victim, Filter.PvsExcept(args.Victim), true);
var selfMessage = Loc.GetString("comp-kitchen-spike-suicide-self"); var selfMessage = Loc.GetString("comp-kitchen-spike-suicide-self",
("this", entity));
_popupSystem.PopupEntity(selfMessage, args.Victim, args.Victim); _popupSystem.PopupEntity(selfMessage, args.Victim, args.Victim);
args.Handled = true; args.Handled = true;
} }
@@ -160,7 +163,11 @@ namespace Content.Server.Kitchen.EntitySystems
UpdateAppearance(uid, null, component); UpdateAppearance(uid, null, component);
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid, PopupType.LargeCaution); _popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill",
("user", Identity.Entity(userUid, EntityManager)),
("victim", Identity.Entity(victimUid, EntityManager)),
("this", uid)),
uid, PopupType.LargeCaution);
_transform.SetCoordinates(victimUid, Transform(uid).Coordinates); _transform.SetCoordinates(victimUid, Transform(uid).Coordinates);
// THE WHAT? // THE WHAT?

View File

@@ -93,13 +93,19 @@ namespace Content.Server.Nutrition.EntitySystems
protected override void CreamedEntity(EntityUid uid, CreamPiedComponent creamPied, ThrowHitByEvent args) protected override void CreamedEntity(EntityUid uid, CreamPiedComponent creamPied, ThrowHitByEvent args)
{ {
_popup.PopupEntity(Loc.GetString("cream-pied-component-on-hit-by-message", ("thrower", args.Thrown)), uid, args.Target); _popup.PopupEntity(Loc.GetString("cream-pied-component-on-hit-by-message",
("thrower", Identity.Entity(args.Thrown, EntityManager))),
uid, args.Target);
var otherPlayers = Filter.Empty().AddPlayersByPvs(uid); var otherPlayers = Filter.Empty().AddPlayersByPvs(uid);
if (TryComp<ActorComponent>(args.Target, out var actor)) if (TryComp<ActorComponent>(args.Target, out var actor))
{ {
otherPlayers.RemovePlayer(actor.PlayerSession); otherPlayers.RemovePlayer(actor.PlayerSession);
} }
_popup.PopupEntity(Loc.GetString("cream-pied-component-on-hit-by-message-others", ("owner", Identity.Name(uid, EntityManager)), ("thrower", args.Thrown)), uid, otherPlayers, false); _popup.PopupEntity(Loc.GetString("cream-pied-component-on-hit-by-message-others",
("owner", Identity.Entity(uid, EntityManager)),
("thrower", Identity.Entity(args.Thrown, EntityManager))),
uid, otherPlayers, false);
} }
private void OnRejuvenate(Entity<CreamPiedComponent> entity, ref RejuvenateEvent args) private void OnRejuvenate(Entity<CreamPiedComponent> entity, ref RejuvenateEvent args)

View File

@@ -381,7 +381,8 @@ namespace Content.Shared.Cuffs
_popup.PopupClient(Loc.GetString("handcuff-component-cuff-interrupt-message", _popup.PopupClient(Loc.GetString("handcuff-component-cuff-interrupt-message",
("targetName", Identity.Name(target, EntityManager, user))), user, user); ("targetName", Identity.Name(target, EntityManager, user))), user, user);
_popup.PopupClient(Loc.GetString("handcuff-component-cuff-interrupt-other-message", _popup.PopupClient(Loc.GetString("handcuff-component-cuff-interrupt-other-message",
("otherName", Identity.Name(user, EntityManager, target))), target, target); ("otherName", Identity.Name(user, EntityManager, target)),
("otherEnt", user)), target, target);
} }
} }
} }

View File

@@ -210,7 +210,10 @@ public abstract class SharedStrippableSystem : EntitySystem
var (time, stealth) = GetStripTimeModifiers(user, target, held, slotDef.StripTime); var (time, stealth) = GetStripTimeModifiers(user, target, held, slotDef.StripTime);
if (!stealth) if (!stealth)
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert", ("user", Identity.Entity(user, EntityManager)), ("item", user.Comp.ActiveHandEntity!.Value)), target, target, PopupType.Large); _popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert",
("user", Identity.Entity(user, EntityManager)),
("item", user.Comp.ActiveHandEntity!.Value)),
target, target, PopupType.Large);
var prefix = stealth ? "stealthily " : ""; var prefix = stealth ? "stealthily " : "";
_adminLogger.Add(LogType.Stripping, LogImpact.Low, $"{ToPrettyString(user):actor} is trying to {prefix}place the item {ToPrettyString(held):item} in {ToPrettyString(target):target}'s {slot} slot"); _adminLogger.Add(LogType.Stripping, LogImpact.Low, $"{ToPrettyString(user):actor} is trying to {prefix}place the item {ToPrettyString(held):item} in {ToPrettyString(target):target}'s {slot} slot");
@@ -302,7 +305,10 @@ public abstract class SharedStrippableSystem : EntitySystem
if (IsStripHidden(slotDef, user)) if (IsStripHidden(slotDef, user))
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-hidden", ("slot", slot)), target, target, PopupType.Large); _popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-hidden", ("slot", slot)), target, target, PopupType.Large);
else else
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner", ("user", Identity.Entity(user, EntityManager)), ("item", item)), target, target, PopupType.Large); _popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner",
("user", Identity.Entity(user, EntityManager)),
("item", item)),
target, target, PopupType.Large);
} }
var prefix = stealth ? "stealthily " : ""; var prefix = stealth ? "stealthily " : "";
@@ -408,7 +414,10 @@ public abstract class SharedStrippableSystem : EntitySystem
var (time, stealth) = GetStripTimeModifiers(user, target, null, targetStrippable.HandStripDelay); var (time, stealth) = GetStripTimeModifiers(user, target, null, targetStrippable.HandStripDelay);
if (!stealth) if (!stealth)
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert-hand", ("user", Identity.Entity(user, EntityManager)), ("item", user.Comp.ActiveHandEntity!.Value)), target, target, PopupType.Large); _popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert-hand",
("user", Identity.Entity(user, EntityManager)),
("item", user.Comp.ActiveHandEntity!.Value)),
target, target, PopupType.Large);
var prefix = stealth ? "stealthily " : ""; var prefix = stealth ? "stealthily " : "";
_adminLogger.Add(LogType.Stripping, LogImpact.Low, $"{ToPrettyString(user):actor} is trying to {prefix}place the item {ToPrettyString(held):item} in {ToPrettyString(target):target}'s hands"); _adminLogger.Add(LogType.Stripping, LogImpact.Low, $"{ToPrettyString(user):actor} is trying to {prefix}place the item {ToPrettyString(held):item} in {ToPrettyString(target):target}'s hands");
@@ -510,7 +519,10 @@ public abstract class SharedStrippableSystem : EntitySystem
var (time, stealth) = GetStripTimeModifiers(user, target, null, targetStrippable.HandStripDelay); var (time, stealth) = GetStripTimeModifiers(user, target, null, targetStrippable.HandStripDelay);
if (!stealth) if (!stealth)
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner", ("user", Identity.Entity(user, EntityManager)), ("item", item)), target, target); _popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner",
("user", Identity.Entity(user, EntityManager)),
("item", item)),
target, target);
var prefix = stealth ? "stealthily " : ""; var prefix = stealth ? "stealthily " : "";
_adminLogger.Add(LogType.Stripping, LogImpact.Low, $"{ToPrettyString(user):actor} is trying to {prefix}strip the item {ToPrettyString(item):item} from {ToPrettyString(target):target}'s hands"); _adminLogger.Add(LogType.Stripping, LogImpact.Low, $"{ToPrettyString(user):actor} is trying to {prefix}strip the item {ToPrettyString(item):item} from {ToPrettyString(target):target}'s hands");

View File

@@ -13,8 +13,8 @@ handcuff-component-cuff-other-success-message = You successfully restrain {$othe
handcuff-component-cuff-by-other-success-message = You have been restrained by {$otherName}! handcuff-component-cuff-by-other-success-message = You have been restrained by {$otherName}!
handcuff-component-cuff-self-success-message = You restrain yourself. handcuff-component-cuff-self-success-message = You restrain yourself.
handcuff-component-cuff-interrupt-message = You were interrupted while restraining {$targetName}! handcuff-component-cuff-interrupt-message = You were interrupted while restraining {$targetName}!
handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} while they are restraining you! handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} while { SUBJECT($otherEnt) } { CONJUGATE-BE($otherEnt) } restraining you!
handcuff-component-cuff-interrupt-self-message = You were interrupted while restraining yourself. handcuff-component-cuff-interrupt-self-message = You were interrupted while restraining yourself.
handcuff-component-cuff-interrupt-buckled-message = You can't buckle while restrained! handcuff-component-cuff-interrupt-buckled-message = You can't buckle while restrained!
handcuff-component-cuff-interrupt-unbuckled-message = You can't unbuckle while restrained! handcuff-component-cuff-interrupt-unbuckled-message = You can't unbuckle while restrained!
handcuff-component-cannot-drop-cuffs = You are unable to put the restraints on {$target} handcuff-component-cannot-drop-cuffs = You are unable to put the restraints on {$target}.

View File

@@ -6,10 +6,10 @@ comp-kitchen-spike-deny-not-dead = { CAPITALIZE(THE($victim)) } can't be butcher
comp-kitchen-spike-begin-hook-victim = { CAPITALIZE(THE($user)) } begins dragging you onto { THE($this) }! comp-kitchen-spike-begin-hook-victim = { CAPITALIZE(THE($user)) } begins dragging you onto { THE($this) }!
comp-kitchen-spike-begin-hook-self = You begin dragging yourself onto { THE($this) }! comp-kitchen-spike-begin-hook-self = You begin dragging yourself onto { THE($this) }!
comp-kitchen-spike-kill = { CAPITALIZE(THE($user)) } has forced { THE($victim) } onto the spike, killing them instantly! comp-kitchen-spike-kill = { CAPITALIZE(THE($user)) } has forced { THE($victim) } onto { THE($this) }, killing { OBJECT($victim) } instantly!
comp-kitchen-spike-suicide-other = { CAPITALIZE(THE($victim)) } has thrown themselves on a meat spike! comp-kitchen-spike-suicide-other = { CAPITALIZE(THE($victim)) } threw { REFLEXIVE($victim) } on { THE($this) }!
comp-kitchen-spike-suicide-self = You throw yourself on a meat spike! comp-kitchen-spike-suicide-self = You throw yourself on { THE($this) }!
comp-kitchen-spike-knife-needed = You need a knife to do this. comp-kitchen-spike-knife-needed = You need a knife to do this.
comp-kitchen-spike-remove-meat = You remove some meat from { THE($victim) }. comp-kitchen-spike-remove-meat = You remove some meat from { THE($victim) }.

View File

@@ -2,12 +2,12 @@
### Interaction Messages ### Interaction Messages
# When trying to eat food without the required utensil... but you gotta hold it # When trying to eat food without the required utensil... but you gotta hold it
food-you-need-to-hold-utensil = You need to be holding a {$utensil} to eat that! food-you-need-to-hold-utensil = You need to be holding {INDEFINITE($utensil)} {$utensil} to eat that!
food-nom = Nom. {$flavors} food-nom = Nom. {$flavors}
food-swallow = You swallow the {$food}. {$flavors} food-swallow = You swallow { THE($food) }. {$flavors}
food-has-used-storage = You cannot eat the {$food} with an item stored inside. food-has-used-storage = You cannot eat { THE($food) } with an item stored inside.
food-system-remove-mask = You need to take off the {$entity} first. food-system-remove-mask = You need to take off the {$entity} first.

View File

@@ -8,8 +8,8 @@ strippable-component-cannot-unequip-message = {CAPITALIZE(THE($owner))} cannot u
strippable-component-cannot-drop-message = {CAPITALIZE(THE($owner))} cannot drop that! strippable-component-cannot-drop-message = {CAPITALIZE(THE($owner))} cannot drop that!
strippable-component-alert-owner = {CAPITALIZE(THE($user))} is removing your {$item}! strippable-component-alert-owner = {CAPITALIZE(THE($user))} is removing your {$item}!
strippable-component-alert-owner-hidden = You feel someone fumbling in your {$slot}! strippable-component-alert-owner-hidden = You feel someone fumbling in your {$slot}!
strippable-component-alert-owner-insert = {CAPITALIZE(THE($user))} is putting {$item} on you! strippable-component-alert-owner-insert = {CAPITALIZE(THE($user))} is putting {INDEFINITE($item)} {$item} on you!
strippable-component-alert-owner-insert-hand = {CAPITALIZE(THE($user))} is putting {$item} in your hand! strippable-component-alert-owner-insert-hand = {CAPITALIZE(THE($user))} is putting {INDEFINITE($item)} {$item} in your hand!
# generic warning for when a user interacts with your equipped items. # generic warning for when a user interacts with your equipped items.
strippable-component-alert-owner-interact = {CAPITALIZE(THE($user))} is fumbling around with your {$item}! strippable-component-alert-owner-interact = {CAPITALIZE(THE($user))} is fumbling around with your {$item}!