# `mix leaf.gettext.extract`
[🔗](https://github.com/alexdont/leaf/blob/main/lib/mix/tasks/leaf.gettext.extract.ex#L1)

Regenerates `priv/gettext/leaf.pot`.

Leaf's translatable strings go through a bare `t/1` rather than a Gettext
macro, so `mix gettext.extract` has nothing to hook into — and a host app
can't extract msgids out of a dependency's source anyway. This scans
`lib/leaf.ex` for `t("…")` calls and writes the catalog template hosts
merge into their own.

    mix leaf.gettext.extract

`Leaf.GettextPotTest` fails when the shipped file is out of date, so a
new string in the template is caught before it ships untranslatable.

---

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