From b2a9eb0a1b2202ea82f0a4f2cfe9fb4a24520ccf Mon Sep 17 00:00:00 2001 From: picospuch Date: Thu, 9 Jul 2026 01:13:36 +0800 Subject: [PATCH] fix: locale C or en_US has its own plural manipulation, the default one (#15375) --- frontend/gettext.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/gettext.lua b/frontend/gettext.lua index e4895a88f..d11fb0aac 100644 --- a/frontend/gettext.lua +++ b/frontend/gettext.lua @@ -166,7 +166,10 @@ function GetText_mt.__index.changeLang(new_lang) -- the "C" locale disables localization altogether -- can be various things such as `en_US` or `en_US:en` if new_lang == "C" or new_lang == nil or new_lang == "" - or new_lang:match("^en_US") == "en_US" then return end + or new_lang:match("^en_US") == "en_US" then + GetText.getPlural = getDefaultPlural + return + end -- strip encoding suffix in locale like "zh_CN.utf8" new_lang = new_lang:sub(1, new_lang:find(".%."))