Phoenix Gettext error: ** (CaseClauseError) no case clause matching: 2

Phoenix Gettext error: ** (CaseClauseError) no case clause matching: 2

在我的 Phoenix 项目中,我的 priv/gettext/pl/error.po 文件中有以下翻译:

msgid "should be at least %{count} character(s)"
msgid_plural "should be at least %{count} character(s)"
msgstr[0] "Ma nieprawidłową długość (powinna wynośić co najmniej %{count})."
msgstr[1] "Ma nieprawidłową długość (powinna wynośić co najmniej %{count})."

现在我尝试在控制台中使用 Gettext 并使用以下行:

Gettext.dngettext(TattooBackend.Web.Gettext, "errors", "should be at least %{count} character(s)", "should be at least %{count} character(s)", 6)

这个returns我以下错误:

** (CaseClauseError) no case clause matching: 2
    (tattoo_backend) lib/tattoo_backend/web/gettext.ex:1: TattooBackend.Web.Gettext.lngettext/6
           (gettext) lib/gettext.ex:616: Gettext.dngettext/6

我认为这是因为波兰语有 3 种复数形式,所以您需要三种 msgstr 形式。

例如:jeden stół、dwa stoły、pięć stołów。