Skip to content

Commit ccc5f61

Browse files
Localization of steal targets (space-wizards#30153)
* Localization of steal targets * Correction of localization of theft objects * The second correction of the localization of theft targets * Update steal-target-groups.ftl Co-authored-by: Ed <[email protected]> * Revision of the localization method * Choosing a simple option for localization * Fix TechnologyDisk name * Corrections based on feedback received * correction of declension --------- Co-authored-by: Ed <[email protected]>
1 parent af53d55 commit ccc5f61

File tree

5 files changed

+128
-63
lines changed

5 files changed

+128
-63
lines changed

Content.Server/Objectives/Systems/StealConditionSystem.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@ private void OnAssigned(Entity<StealConditionComponent> condition, ref Objective
7272
private void OnAfterAssign(Entity<StealConditionComponent> condition, ref ObjectiveAfterAssignEvent args)
7373
{
7474
var group = _proto.Index(condition.Comp.StealGroup);
75+
string localizedName = Loc.GetString(group.Name);
7576

7677
var title =condition.Comp.OwnerText == null
77-
? Loc.GetString(condition.Comp.ObjectiveNoOwnerText, ("itemName", group.Name))
78-
: Loc.GetString(condition.Comp.ObjectiveText, ("owner", Loc.GetString(condition.Comp.OwnerText)), ("itemName", group.Name));
78+
? Loc.GetString(condition.Comp.ObjectiveNoOwnerText, ("itemName", localizedName))
79+
: Loc.GetString(condition.Comp.ObjectiveText, ("owner", Loc.GetString(condition.Comp.OwnerText)), ("itemName", localizedName));
7980

8081
var description = condition.Comp.CollectionSize > 1
81-
? Loc.GetString(condition.Comp.DescriptionMultiplyText, ("itemName", group.Name), ("count", condition.Comp.CollectionSize))
82-
: Loc.GetString(condition.Comp.DescriptionText, ("itemName", group.Name));
82+
? Loc.GetString(condition.Comp.DescriptionMultiplyText, ("itemName", localizedName), ("count", condition.Comp.CollectionSize))
83+
: Loc.GetString(condition.Comp.DescriptionText, ("itemName", localizedName));
8384

8485
_metaData.SetEntityName(condition.Owner, title, args.Meta);
8586
_metaData.SetEntityDescription(condition.Owner, description, args.Meta);

Content.Shared/Objectives/Prototypes/StealTargetGroupPrototype.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ namespace Content.Shared.Objectives;
1010
public sealed partial class StealTargetGroupPrototype : IPrototype
1111
{
1212
[IdDataField] public string ID { get; private set; } = default!;
13-
[DataField] public string Name { get; private set; } = string.Empty;
13+
[DataField] public LocId Name { get; private set; } = string.Empty;
1414
[DataField] public SpriteSpecifier Sprite { get; private set; } = SpriteSpecifier.Invalid;
1515
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Traitor single items
2+
steal-target-groups-hypospray = hypospray
3+
steal-target-groups-handheld-crew-monitor = handheld crew monitor
4+
steal-target-groups-clothing-outer-hardsuit-rd = experimental research hardsuit
5+
steal-target-groups-hand-teleporter = hand teleporter
6+
steal-target-groups-clothing-shoes-boots-mag-adv = advanced magboots
7+
steal-target-groups-box-folder-qm-clipboard = requisition digi-board
8+
steal-target-groups-food-meat-corgi = prime-cut corgi meat
9+
steal-target-groups-captain-id-card = captain ID card
10+
steal-target-groups-jetpack-captain-filled = captain's jetpack
11+
steal-target-groups-weapon-antique-laser = antique laser pistol
12+
steal-target-groups-nuke-disk = nuclear authentication disk
13+
steal-target-groups-weapon-energy-shot-gun = energy shotgun
14+
15+
# Thief Collection
16+
steal-target-groups-figurines = figurine
17+
steal-target-groups-heads-cloaks = head's cloak
18+
steal-target-groups-heads-bedsheets = head's bedsheet
19+
steal-target-groups-stamps = stamp
20+
steal-target-groups-door-remotes = door remote
21+
steal-target-groups-encryption-keys = encryption key
22+
steal-target-groups-technology-disks = technology disk
23+
steal-target-groups-id-cards = ID Card
24+
steal-target-groups-lamps = LAMP
25+
26+
# Thief single item
27+
steal-target-groups-forensic-scanner = forensic scanner
28+
steal-target-groups-flippo-engraved-lighter = detective's Flippo engraved lighter
29+
steal-target-groups-ammo-tech-fab-circuitboard = ammo techfab circuit board
30+
steal-target-groups-clothing-head-hat-warden = warden's cap
31+
steal-target-groups-clothing-outer-hardsuit-void-paramed = paramedic void suit
32+
steal-target-groups-medical-tech-fab-circuitboard = medical techfab machine board
33+
steal-target-groups-clothing-headset-alt-medical = chief medical officer's over-ear headset
34+
steal-target-groups-research-and-development-server-machine-circuitboard = R&D server machine board
35+
steal-target-groups-fire-axe = fireaxe
36+
steal-target-groups-ame-part-flatpack = AME flatpack
37+
steal-target-groups-salvage-expeditions-computer-circuitboard = salvage expeditions computer board
38+
steal-target-groups-cargo-shuttle-console-circuitboard = cargo shuttle console board
39+
steal-target-groups-clothing-eyes-hud-beer = beer goggles
40+
steal-target-groups-bible = bible
41+
steal-target-groups-clothing-neck-goldmedal = gold medal of crewmanship
42+
steal-target-groups-clothing-neck-clownmedal = clown medal
43+
44+
# Thief structures
45+
steal-target-groups-teg = teg generator part
46+
steal-target-groups-freezer-heater = freezer or heater
47+
steal-target-groups-altar-nanotrasen = nanotrasen altar (any)
48+
49+
steal-target-groups-nuclear-bomb = nuclear fission explosive
50+
steal-target-groups-fax-machine-captain = captain long range fax machine
51+
steal-target-groups-chem-dispenser = chemical dispenser
52+
steal-target-groups-xeno-artifact = alien artifact
53+
steal-target-groups-booze-dispenser = booze dispenser
54+
steal-target-groups-plant-rd = "RD's potted plant"
55+
steal-target-groups-toilet-golden-dirty-water = golden toilet
56+
57+
# Thief Animal
58+
steal-target-groups-animal-named-cat = CMO's Cat
59+
60+
steal-target-groups-animal-ian = Ian
61+
steal-target-groups-animal-mc-griff = McGriff
62+
steal-target-groups-animal-walter = Walter
63+
steal-target-groups-animal-morty = Morty
64+
steal-target-groups-animal-renault = Renault
65+
steal-target-groups-animal-shiva = Shiva
66+
steal-target-groups-animal-tropico = Tropico

Resources/Locale/en-US/objectives/conditions/steal.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ objective-condition-steal-Ian = head of personnel's corgi
88
99
objective-condition-thief-description = The {$itemName} would be a great addition to my collection!
1010
objective-condition-thief-animal-description = The {$itemName} would be a great addition to my collection! Most importantly, alive.
11-
objective-condition-thief-multiply-description = I need to get {$count} {MAKEPLURAL($itemName)} and take them with me.
11+
objective-condition-thief-multiply-description = I need to get {$count} {MAKEPLURAL($itemName)} (any) and take them with me.

0 commit comments

Comments
 (0)