React-Intl 复数消息获取错误
React-Intl plural message getting errors
消息是Check out {count, plural, one {# item}, other {# items}}
。
我正在调用它:
<FormattedMessage id="button.message" values={{ count: cartItemsCount }} />
但我遇到了这些错误:
[React Intl] Error formatting message: "button.message" for locale: "en"
SyntaxError: Expected "{" but "o" found.
和
[React Intl] Cannot format message: "button.message", using message source as fallback.
知道这里发生了什么吗?
您的 ICU 消息无效:Check out {count, plural, one {# item} other {# items}}
(one
和 other
之间没有 ,
消息是Check out {count, plural, one {# item}, other {# items}}
。
我正在调用它:
<FormattedMessage id="button.message" values={{ count: cartItemsCount }} />
但我遇到了这些错误:
[React Intl] Error formatting message: "button.message" for locale: "en"
SyntaxError: Expected "{" but "o" found.
和
[React Intl] Cannot format message: "button.message", using message source as fallback.
知道这里发生了什么吗?
您的 ICU 消息无效:Check out {count, plural, one {# item} other {# items}}
(one
和 other
,