react-intlpluralize

React-Intl plural message getting errors


The message is Check out {count, plural, one {# item}, other {# items}}.

I'm invoking it with:

<FormattedMessage id="button.message" values={{ count: cartItemsCount }} />

But I'm getting these errors:

[React Intl] Error formatting message: "button.message" for locale: "en"
SyntaxError: Expected "{" but "o" found.

and

[React Intl] Cannot format message: "button.message", using message source as fallback.

Any ideas what's going on here?


Solution

  • You ICU message is invalid: Check out {count, plural, one {# item} other {# items}} (no , between one & other