[BUG] Locale instances not actually being created (#860)

Co-authored-by: Zerio <54480523+Z3rio@users.noreply.github.com>
This commit is contained in:
David Malchin
2022-12-14 18:55:17 +02:00
committed by GitHub
parent a3f2e3e8ca
commit 1ef7337ce5
+4 -4
View File
@@ -30,10 +30,10 @@ end
--- Constructor function for a new Locale class instance
--- @param opts table<string, any> - 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