mix leaf.gettext.extract (Leaf v0.5.0)

Copy Markdown View Source

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.