# `AshGettext.AshMessages`
[🔗](https://github.com/Undeadlol1/ash_gettext/blob/v0.1.0/lib/ash_gettext/ash_messages.ex#L1)

The sentences shown for Ash's own errors, which carry no message of their own.

Ash builds the text of these errors from code names: a missing
`delivery_date` prints as "attribute delivery_date is required". So each one
gets a written English sentence here. It is the msgid, and
`mix gettext.extract` finds it for every domain with a `gettext` block.

| Error | Sentence |
| --- | --- |
| `Ash.Error.Changes.Required` | is required |
| `Ash.Error.Changes.InvalidAttribute` | is invalid |
| `Ash.Error.Changes.InvalidArgument` | is invalid |
| `Ash.Error.Forbidden.Policy` | You are not allowed to do this |

An error that already has a message keeps it; that message is its msgid.
A policy with its own message keeps that message too.

# `messages`

```elixir
@spec messages() :: [{module(), String.t()}]
```

Every `{error_module, msgid}` pair.

# `msgid`

```elixir
@spec msgid(term()) :: String.t() | nil
```

The msgid for `error`, or `nil` when it already has a message or is not listed.

# `msgids`

```elixir
@spec msgids() :: [String.t()]
```

Every msgid, each once.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
