Skip to content
Playground(another site)

bynk.resolve.duplicate_message_code

Error A message bundle declares the same code twice in one block.

A message code is the key render looks a template up by, so one block can give it only one text. A second entry under the same code leaves two templates for one key, and the second is refused. Delete the repeat, or give it a code of its own. The same code in different locale blocks is how a translation is written, and is not an error. A locale declared twice is bynk.resolve.duplicate_message_locale.

Example

messages "en" @reference {
"cart.empty" => "Your basket is empty."
"cart.empty" => "Your cart is empty." // ✗ already declared in this block
}
messages "en" @reference {
"cart.empty" => "Your basket is empty."
"cart.total" => "Your total is {total}." // ✓ a code of its own
}

In the Book

See also

  • Every code in its category, Resolution, on the diagnostic index.
  • bynk explain bynk.resolve.duplicate_message_code shows the same from the installed toolchain, without a network.