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

An Ash error whose text is now the translated sentence.

Ash prints its own errors from their module, not from a field, so the
translated text needs a struct that prints it. This one keeps the
`original` error, its `field`, `path` and `class`, and its `message` is
the sentence the person reads. `Exception.message/1` returns it, and
JSON:API renders the original error with that sentence as its `detail`.

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %AshGettext.AshMessages.Translated{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  field: term(),
  message: term(),
  original: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.AshGettext.AshMessages.Translated` without raising it.

## Keys

- :original
- :field
- :message

---

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