From 3fb418382ef601b4df732f66dc3d225b01b5a141 Mon Sep 17 00:00:00 2001 From: Skryptec <48567607+Skryptific@users.noreply.github.com> Date: Tue, 24 Jan 2023 05:51:35 +0100 Subject: [PATCH] refactor(crafting): labels and locales (#1096) --- client.lua | 2 +- locales/en.json | 1 + locales/nl.json | 8 ++++++-- modules/crafting/client.lua | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client.lua b/client.lua index 2f2aeea9d6..deb3b77846 100644 --- a/client.lua +++ b/client.lua @@ -133,7 +133,7 @@ function client.openInventory(inv, data) right = { type = 'crafting', id = data.id, - label = data.label or locale('crafting_bench'), + label = right.label or locale('crafting_bench'), index = data.index, slots = right.slots, items = right.items, diff --git a/locales/en.json b/locales/en.json index fb16b36fb8..18a461740a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -84,5 +84,6 @@ "dumpster": "Dumpster", "crafting_item": "Crafting %s", "crafting_bench": "Crafting Bench", + "open_crafting_bench": "Open Crafting Bench", "not_enough_durability": "%s does not have enough durability" } diff --git a/locales/nl.json b/locales/nl.json index 39e1703729..e6fb57bc5d 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -67,7 +67,7 @@ "unable_stack_items": "Je kan deze items niet op elkaar stapelen", "police_evidence": "Politie bewijskluis", "open_police_evidence": "Open Politie bewijskluis", - "open_stash": "Open Stash", + "open_stash": "Open Opslag", "locker_number": "Kluisnummer", "locker_no_value": "Je moet een waarde invullen om de kluis te openen", "locker_must_number": "De waarde moet een nummer zijn", @@ -81,5 +81,9 @@ "no_durability": "Levensduur van item is verbruikt", "cannot_give": "Niet in staat om %s %s te geven aan het doel", "evidence_cannot_take": "Je rang is niet hoog genoeg om van de bewijskluis te pakken", - "dumpster": "Afvalcontainer" + "dumpster": "Afvalcontainer", + "crafting_item": "%s aan het maken", + "crafting_bench": "Werkbank", + "open_crafting_bench": "Open Werkbank", + "not_enough_durability": "%s heeft niet genoeg levensduur." } diff --git a/modules/crafting/client.lua b/modules/crafting/client.lua index 0c5d4eef47..ee92444a1f 100644 --- a/modules/crafting/client.lua +++ b/modules/crafting/client.lua @@ -44,7 +44,7 @@ local function createCraftingBench(id, data) zone.index = i zone.options = { { - label = 'Open Crafting Bench', + label = zone.label or locale('open_crafting_bench'), canInteract = data.groups and function() return client.hasGroup(data.groups) end or nil, @@ -52,7 +52,7 @@ local function createCraftingBench(id, data) client.openInventory('crafting', { id = id, index = i }) end, distance = zone.distance or 2.0, - icon = 'fas fa-wrench', + icon = zone.icon or 'fas fa-wrench', } }