From 1ef7337ce5e267aa50724646128358b0ead47965 Mon Sep 17 00:00:00 2001 From: David Malchin Date: Wed, 14 Dec 2022 18:55:17 +0200 Subject: [PATCH] [BUG] Locale instances not actually being created (#860) Co-authored-by: Zerio <54480523+Z3rio@users.noreply.github.com> --- shared/locale.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/locale.lua b/shared/locale.lua index ce7b2f5..34fa835 100644 --- a/shared/locale.lua +++ b/shared/locale.lua @@ -30,10 +30,10 @@ end --- Constructor function for a new Locale class instance --- @param opts table - Constructor opts param --- @return Locale -function Locale:new(opts) - setmetatable(self, Locale) +function Locale.new(_, opts) + local self = setmetatable({}, Locale) - self.fallback = opts.fallbackLang and Locale.new({}, { + self.fallback = opts.fallbackLang and Locale:new({ warnOnMissing = false, phrases = opts.fallbackLang.phrases, }) or false @@ -142,4 +142,4 @@ function Locale:delete(phraseTarget, prefix) end end end -end +end \ No newline at end of file