From 3a7f0beb97bcc20a9faddcc3a6969e37d1efd5f4 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Sun, 29 Sep 2024 17:54:11 -0700 Subject: [PATCH 1/3] fix for opening inventories with data --- server/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index 1b2244f39..7cf51cbf3 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -559,9 +559,9 @@ function OpenInventory(source, identifier, data) end if not inventory then inventory = InitializeInventory(identifier, data) end - inventory.maxweight = (inventory and inventory.maxweight) or (data and data.maxweight) or Config.StashSize.maxweight - inventory.slots = (inventory and inventory.slots) or (data and data.slots) or Config.StashSize.slots - inventory.label = (inventory and inventory.label) or (data and data.label) or identifier + inventory.maxweight = (data and data.maxweight) or (inventory and inventory.maxweight) or Config.StashSize.maxweight + inventory.slots = (data and data.slots) or (inventory and inventory.slots) or Config.StashSize.slots + inventory.label = (data and data.label) or (inventory and inventory.label) or identifier inventory.isOpen = source local formattedInventory = { From be8cf49a3ea939e319df38f3f22e88f67fe0407c Mon Sep 17 00:00:00 2001 From: Joel <34402846+Qwerty1Verified@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:15:37 -0400 Subject: [PATCH 2/3] feat: add get inventory export --- server/functions.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/functions.lua b/server/functions.lua index 1b2244f39..4c6ef63b4 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -758,3 +758,9 @@ function RemoveItem(identifier, item, amount, slot, reason) end exports('RemoveItem', RemoveItem) + +function GetInventory(identifier) + return Inventories[identifier] +end + +exports('GetInventory', GetInventory) From c1670d3884470ec173534fa685b2ddb6deb13580 Mon Sep 17 00:00:00 2001 From: Zycti <65127981+zycti@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:21:57 +0000 Subject: [PATCH 3/3] Added Dutch (nl.lua) Locale for QBCore Inventory This pull request introduces a Dutch (nl.lua) translation file for QBCore Inventory. It enables Dutch language support, allowing Dutch-speaking players to interact with the inventory system in their native language. All inventory-related labels, messages, and tooltips have been carefully translated to ensure accuracy and consistency across the UI. --- locales/nl.lua | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 locales/nl.lua diff --git a/locales/nl.lua b/locales/nl.lua new file mode 100644 index 000000000..666d5148f --- /dev/null +++ b/locales/nl.lua @@ -0,0 +1,56 @@ +local Translations = { + progress = { + ['snowballs'] = 'Sneeuwballen verzamelen..', + }, + notify = { + ['failed'] = 'Mislukt', + ['canceled'] = 'Geannuleerd', + ['vlocked'] = 'Voertuig Vergrendeld', + ['notowned'] = 'Dit item is niet van jou!', + ['missitem'] = 'Je hebt dit item niet!', + ['nonb'] = 'Niemand in de buurt!', + ['noaccess'] = 'Geen toegang', + ['nosell'] = 'Je kunt dit item niet verkopen..', + ['itemexist'] = 'Item bestaat niet', + ['notencash'] = 'Je hebt niet genoeg geld..', + ['noitem'] = 'Je hebt niet de juiste items..', + ['gsitem'] = 'Je kunt jezelf geen item geven?', + ['tftgitem'] = 'Je bent te ver weg om items te geven!', + ['infound'] = 'Het item dat je probeerde te geven is niet gevonden!', + ['iifound'] = 'Onjuist item gevonden, probeer opnieuw!', + ['gitemrec'] = 'Je hebt ontvangen ', + ['gitemfrom'] = ' Van ', + ['gitemyg'] = 'Je hebt gegeven ', + ['gitinvfull'] = 'De inventaris van de andere speler is vol!', + ['giymif'] = 'Jouw inventaris is vol!', + ['gitydhei'] = 'Je hebt niet genoeg van het item', + ['gitydhitt'] = 'Je hebt niet genoeg items om over te dragen', + ['navt'] = 'Geen geldig type..', + ['anfoc'] = 'Argumenten niet correct ingevuld..', + ['yhg'] = 'Je hebt gegeven ', + ['cgitem'] = 'Kan item niet geven!', + ['idne'] = 'Item bestaat niet', + ['pdne'] = 'Speler is niet online', + }, + inf_mapping = { + ['opn_inv'] = 'Open Inventaris', + ['tog_slots'] = 'Schakelt sleutelbind-slots om', + ['use_item'] = 'Gebruikt het item in slot ', + }, + menu = { + ['vending'] = 'Verkoopautomaat', + ['bin'] = 'Open Prullenbak', + ['craft'] = 'Maak', + ['o_bag'] = 'Open Tas', + }, + interaction = { + ['craft'] = '~g~E~w~ - Maken', + }, +} + +if GetConvar('qb_locale', 'en') == 'nl' then + Lang = Locale:new({ + phrases = Translations, + warnOnMissing = true, + }) +end