# `MishkaSlug.Messages`
[🔗](https://github.com/mishka-group/mishka_slug/blob/v0.0.1/lib/mishka_slug/messages.ex#L5)

The messages a site admin can see, translated in the locale of the calling process.

`MishkaSlug.slugify/2` returns atoms such as `{:error, :empty}` and never a text; this module
turns those reasons into sentences for forms. Every text is looked up in the `mishka_slug`
domain of `gettext_backend/0`.

# `error`

```elixir
@spec error(MishkaSlug.reason()) :: String.t()
```

Returns the message for a `MishkaSlug.slugify/2` error reason.

## Examples

    iex> MishkaSlug.Messages.error(:empty)
    "has no letters or digits to make a slug from"

    iex> MishkaSlug.Messages.error(:no_allowed_script)
    "uses letters or digits that the site languages do not allow in a slug"

# `gettext_backend`

```elixir
@spec gettext_backend() :: module()
```

Returns the Gettext backend in use: the `:gettext_backend` of the `:mishka_slug` application
config, or `MishkaSlug.Gettext`.

# `not_a_string`

```elixir
@spec not_a_string() :: String.t()
```

Returns the message for a value that is not a string.

## Examples

    iex> MishkaSlug.Messages.not_a_string()
    "is not a string value"

---

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