Skip to content

Commit

Permalink
fix: don't break on non-enUS/deDE locales
Browse files Browse the repository at this point in the history
  • Loading branch information
bloerwald committed Oct 20, 2024
1 parent 24f489d commit 0c9f5da
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions MapCleaner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ local L = {
local currentLocale = GetLocale()
L.__meta = {}
L.__meta.__index = function(tab, key)
local l = currentLocale
if tab[l][key] == nil then
l = 'enUS'
end
return tab[l][key] or key
local sub = rawget(tab, currentLocale) or rawget(tab, 'enUS')
return rawget(sub, key) or key
end
setmetatable(L, L.__meta)

Expand Down

0 comments on commit 0c9f5da

Please sign in to comment.