Leaf.Gettext.Pot (Leaf v0.13.2)

Copy Markdown View Source

Renders priv/gettext/leaf.pot from Leaf's source.

Split out of the mix task so a test can assert the shipped file is current without shelling out — a new toolbar string that never reaches the catalog ships untranslatable, and nobody notices until a host asks why half the editor is still in English.

Summary

Functions

Every t("…") msgid in source, deduplicated and sorted.

The full .pot contents for the given Elixir source.

The source the catalog is built from: lib/leaf.ex and everything under lib/leaf/, where the component's strings and the chip renderer's live. Not the tooling — this module and the mix task — whose docs talk about translated calls without being any.

Functions

msgids(source)

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

Every t("…") msgid in source, deduplicated and sorted.

render(source)

@spec render(String.t()) :: String.t()

The full .pot contents for the given Elixir source.

source()

@spec source() :: String.t()

The source the catalog is built from: lib/leaf.ex and everything under lib/leaf/, where the component's strings and the chip renderer's live. Not the tooling — this module and the mix task — whose docs talk about translated calls without being any.