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.
reviewable/pr11648/r1
Frans de Jonge 4 weeks ago committed by GitHub
parent 279f16aa23
commit ad266f46c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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)

Loading…
Cancel
Save