AshGettext.AshMessages (AshGettext v0.1.0)

Copy Markdown View Source

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.

ErrorSentence
Ash.Error.Changes.Requiredis required
Ash.Error.Changes.InvalidAttributeis invalid
Ash.Error.Changes.InvalidArgumentis invalid
Ash.Error.Forbidden.PolicyYou 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.

Summary

Functions

Every {error_module, msgid} pair.

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

Every msgid, each once.

Functions

messages()

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

Every {error_module, msgid} pair.

msgid(arg1)

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

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

msgids()

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

Every msgid, each once.