View Source Pow.Extension.Phoenix.Messages (Pow v1.0.36)

Module that handles messages for extensions.

To override messages from extensions, the function name has to start with the snake cased extension name. So the a_message/1 function from PowExtensionOne, should be written as pow_extension_one_a_message/1.

Usage

defmodule MyAppWeb.Pow.Messages do
  use Pow.Phoenix.Messages
  use Pow.Extension.Phoenix.Messages,
    extensions: [PowExtensionOne, PowExtensionTwo]

  import MyAppWeb.Gettext

  def pow_extension_one_a_message(_conn), do: gettext("A message.")

  def pow_extension_two_a_message(_conn), do: gettext("A message.")
end

Remember to update configuration with messages_backend: MyAppWeb.Pow.Messages.