mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:01:24 +00:00
[BUG] Locale instances not actually being created (#860)
Co-authored-by: Zerio <54480523+Z3rio@users.noreply.github.com>
This commit is contained in:
+4
-4
@@ -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
|
||||
Reference in New Issue
Block a user