From 0c9f5daa4bb8a4380b6e9b44700ca31f869a5746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20L=C3=B6rwald?= Date: Sun, 20 Oct 2024 16:31:54 +0200 Subject: [PATCH] fix: don't break on non-enUS/deDE locales --- MapCleaner.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MapCleaner.lua b/MapCleaner.lua index 285512b..f0cce0c 100755 --- a/MapCleaner.lua +++ b/MapCleaner.lua @@ -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)