Skip to content
Playground(another site)

bynk.messages.placeholder_mismatch

Error A locale's template for a code uses a different set of {name} placeholders than the reference locale's.

A caller supplies a message's arguments by name, so every locale's template for a code must use the same set of {name} placeholders as the reference locale's. A translation that renames, drops or adds one would ask for an argument the caller never passes. Order is free: translations may reorder placeholders to suit their grammar. Rename the placeholder to match the reference. A placeholder of the right name but a different ICU kind is bynk.messages.format_mismatch.

Example

messages "en" @reference {
"cart.greeting" => "Hello, {name}!"
}
messages "fr" {
"cart.greeting" => "Bonjour, {prenom} !" // ✗ the reference uses {name}
"cart.greeting" => "Bonjour, {name} !" // ✓
}

In the Book

See also

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