From fc667b9d24985b7066096d1f273215c2d8d9f897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Vnou=C4=8Dek?= Date: Tue, 3 Dec 2024 22:41:08 +0100 Subject: [PATCH] fix: Falsy translation loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non-UI translations (if they’re added in the future) went through. It might be a bit confusing for developers reading the code, just like it was for me. --- client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.lua b/client.lua index 3b208d5..9411d03 100644 --- a/client.lua +++ b/client.lua @@ -15,7 +15,7 @@ local cam2 = nil local function SetDisplay(bool) local translations = {} for k in pairs(Lang.fallback and Lang.fallback.phrases or Lang.phrases) do - if k:sub(0, #'ui.') then + if k:sub(0, #'ui.') == "ui." then translations[k:sub(#'ui.' + 1)] = Lang:t(k) end end