The behaviour every user-facing Flicker string routes through (ADR-009).
Every visible string and every screen-reader announcement the select
component renders comes from message/2 — never an inline literal in a
template. Flicker.Messages.English is the complete default
implementation and doubles as the canonical list of every message key.
Overriding
A host can override messages globally:
config :flicker, messages: MyAppWeb.FlickerMessagesor per-component, via the messages attr on Flicker.select/1. An
override module needs only implement the keys it wants to change —
delegate the rest to Flicker.Messages.English:
defmodule MyAppWeb.FlickerMessages do
@behaviour Flicker.Messages
@impl true
def message(:search_placeholder, _bindings), do: "Rechercher..."
def message(key, bindings), do: Flicker.Messages.English.message(key, bindings)
endMessage keys are public API once shipped — renaming one is a breaking change.
Summary
Types
Named values interpolated into a message (e.g. %{count: 5}).
A message key. See Flicker.Messages.English for the full list.
Callbacks
Returns the user-facing string for key, interpolating bindings.
Functions
Looks up key through the resolved messages module, falling back to
Flicker.Messages.English if the resolved module doesn't implement that
key — so a partial override module can never crash a render.
Resolves the effective messages module for a component instance.
Types
@type bindings() :: map()
Named values interpolated into a message (e.g. %{count: 5}).
@type key() :: atom()
A message key. See Flicker.Messages.English for the full list.
Callbacks
Functions
Looks up key through the resolved messages module, falling back to
Flicker.Messages.English if the resolved module doesn't implement that
key — so a partial override module can never crash a render.
Resolves the effective messages module for a component instance.
Precedence: the per-component messages attr override, then
config :flicker, :messages, then Flicker.Messages.English.