Localize store categories (#12453)

This commit is contained in:
Morb
2022-11-09 02:36:48 +03:00
committed by GitHub
parent 6775648cc9
commit 8be499df5d
3 changed files with 36 additions and 14 deletions

View File

@@ -10,12 +10,18 @@ namespace Content.Shared.Store;
[Serializable, NetSerializable, DataDefinition] [Serializable, NetSerializable, DataDefinition]
public sealed class StoreCategoryPrototype : IPrototype public sealed class StoreCategoryPrototype : IPrototype
{ {
private string _name = string.Empty;
[ViewVariables] [ViewVariables]
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name")] [DataField("name")]
public string Name { get; } = string.Empty; public string Name
{
get => _name;
private set => _name = Loc.GetString(value);
}
[DataField("priority")] [DataField("priority")]
public int Priority { get; } = 0; public int Priority { get; } = 0;

View File

@@ -0,0 +1,16 @@
# Uplink
store-category-debug = debug category
store-category-debug2 = debug category 2
store-category-weapons = Weapons
store-category-ammo = Ammo
store-category-explosives = Explosives
store-category-misc = Misc
store-category-bundles = Bundles
store-category-tools = Tools
store-category-utility = Utility
store-category-job = Job
store-category-armor = Armor
store-category-pointless = Pointless
# Revenant
store-category-abilities = Abilities

View File

@@ -1,65 +1,65 @@
#debug #debug
- type: storeCategory - type: storeCategory
id: Debug id: Debug
name: debug category name: store-category-debug
- type: storeCategory - type: storeCategory
id: Debug2 id: Debug2
name: debug category 2 name: store-category-debug2
#uplink categoires #uplink categoires
- type: storeCategory - type: storeCategory
id: UplinkWeapons id: UplinkWeapons
name: Weapons name: store-category-weapons
priority: 0 priority: 0
- type: storeCategory - type: storeCategory
id: UplinkAmmo id: UplinkAmmo
name: Ammo name: store-category-ammo
priority: 1 priority: 1
- type: storeCategory - type: storeCategory
id: UplinkExplosives id: UplinkExplosives
name: Explosives name: store-category-explosives
priority: 2 priority: 2
- type: storeCategory - type: storeCategory
id: UplinkMisc id: UplinkMisc
name: Misc name: store-category-misc
priority: 3 priority: 3
- type: storeCategory - type: storeCategory
id: UplinkBundles id: UplinkBundles
name: Bundles name: store-category-bundles
priority: 4 priority: 4
- type: storeCategory - type: storeCategory
id: UplinkTools id: UplinkTools
name: Tools name: store-category-tools
priority: 5 priority: 5
- type: storeCategory - type: storeCategory
id: UplinkUtility id: UplinkUtility
name: Utility name: store-category-utility
priority: 6 priority: 6
- type: storeCategory - type: storeCategory
id: UplinkJob id: UplinkJob
name: Job name: store-category-job
priority: 7 priority: 7
- type: storeCategory - type: storeCategory
id: UplinkArmor id: UplinkArmor
name: Armor name: store-category-armor
priority: 8 priority: 8
- type: storeCategory - type: storeCategory
id: UplinkPointless id: UplinkPointless
name: Pointless name: store-category-pointless
priority: 9 priority: 9
#revenant #revenant
- type: storeCategory - type: storeCategory
id: RevenantAbilities id: RevenantAbilities
name: Abilities name: store-category-abilities