From af0823e4167355b01766461f4d0c17ed6db189c6 Mon Sep 17 00:00:00 2001 From: Sigurd <81210348+SjurdVrancken@users.noreply.github.com> Date: Sat, 17 Aug 2024 12:54:41 +0200 Subject: [PATCH 1/2] feat(locales): add .nl locales --- locales/nl.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 locales/nl.lua diff --git a/locales/nl.lua b/locales/nl.lua new file mode 100644 index 0000000..9a2fc6f --- /dev/null +++ b/locales/nl.lua @@ -0,0 +1,22 @@ +local Translations = { + menus = { + header = 'Crafting Menu', + pickupworkBench = 'Pak werkbank op', + entercraftAmount = 'Voer hoeveelheid in:', + }, + notifications = { + pickupBench = 'Je hebt je werkbank opgepakt.', + invalidAmount = 'Ongeldige hoeveelheid', + invalidInput = 'Ongeldige invoer', + notenoughMaterials = "Je hebt niet genoeg materialen!", + craftingCancelled = 'Je hebt je crafting geannuleerd', + tablePlace = 'Je hebt je werkbank geplaatst', + craftMessage = 'Je hebt een %s gemaakt', + xpGain = 'Je hebt %d XP verkregen %s', + } +} + +Lang = Lang or Locale:new({ + phrases = Translations, + warnOnMissing = true +}) From 4055a41532bb47daffeb2f81be1dacdf26c03a7a Mon Sep 17 00:00:00 2001 From: Sigurd <81210348+SjurdVrancken@users.noreply.github.com> Date: Wed, 13 Nov 2024 23:01:24 +0100 Subject: [PATCH 2/2] fix(crafting): added missing if condition --- locales/nl.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/locales/nl.lua b/locales/nl.lua index 9a2fc6f..ea49f0c 100644 --- a/locales/nl.lua +++ b/locales/nl.lua @@ -16,7 +16,10 @@ local Translations = { } } -Lang = Lang or Locale:new({ - phrases = Translations, - warnOnMissing = true -}) +if GetConvar('qb_locale', 'en') == 'nl' then + Lang = Lang or Locale:new({ + phrases = Translations, + warnOnMissing = true, + fallbackLang = Lang, + }) +end