From ad266f46c2f4e7867f5a0415782cfe098d30b50c Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Tue, 9 Apr 2024 10:17:26 +0200 Subject: [PATCH] GetText: fix crash if a value is used as unique value and as singular/plural (#11643) Concretely 1 second, %1 seconds since #11549 added `1 second` all by itself. --- frontend/gettext.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/gettext.lua b/frontend/gettext.lua index d9b1f3fee..b5d14366f 100644 --- a/frontend/gettext.lua +++ b/frontend/gettext.lua @@ -58,7 +58,7 @@ Returns a translation. local translation = _("A meaningful message.") --]] function GetText_mt.__call(gettext, msgid) - return gettext.translation[msgid] or gettext.wrapUntranslated(msgid) + return gettext.translation[msgid] and gettext.translation[msgid][0] or gettext.translation[msgid] or gettext.wrapUntranslated(msgid) end local function c_escape(what_full, what)