View Source Gettext.Interpolation behaviour (gettext v0.19.1)

Behaviour to provide Gettext String Interpolation.

Link to this section Summary

Link to this section Types

Specs

translation_type() :: :translation | :plural_translation

Link to this section Callbacks

Link to this macrocallback

compile_interpolate( translation_type, message, bindings )

View Source

Specs

compile_interpolate(
  term(),
  translation_type :: translation_type(),
  message :: String.t(),
  bindings :: map()
) :: Macro.t()

Specs

message_format() :: String.t()

Defines the gettext message format https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html#index-msgstr

Link to this callback

runtime_interpolate(message, bindings)

View Source

Specs

runtime_interpolate(message :: String.t(), bindings :: map()) ::
  {:ok, String.t()}
  | {:mssing_bindings, message :: String.t(), missing_bindings :: [atom()]}