Skip to content
Playground(another site)

bynk.messages.format_mismatch

Error A code's placeholder is formatted as a different ICU kind (plain/plural/select/number/date) across declared locales.

A placeholder that appears in the reference locale's template and in another locale's must be formatted the same way in both: plain {n}, plural, select, number or date. The caller supplies one kind of value for it, and an interface cannot sensibly be plural-aware in one language and plain in another. Use the same kind in every locale. The arms inside a plural or select may differ. A different placeholder name is bynk.messages.placeholder_mismatch.

Example

messages "en" @reference {
"cart.count" => "{n, plural, one {# item} other {# items}}"
}
messages "fr" {
"cart.count" => "{n} articles" // ✗ plain here, plural in the reference
"cart.count" => "{n, plural, one {# article} other {# articles}}" // ✓
}

In the Book

See also

  • Every code in its category, Message bundles, on the diagnostic index.
  • bynk explain bynk.messages.format_mismatch shows the same from the installed toolchain, without a network.