API Reference gettext_ts v#0.2.0

Copy Markdown View Source

Modules

Gettext catalogs, generated to TypeScript.

Registers mix gettext_ts.codegen with mix ash.codegen via Ash's generic codegen callback. Add to any domain

Reads the Gettext tree into a nested locale → domain → msgid → msgstr structure. Nesting is the collision fix: the same msgid may legitimately carry different translations in different domains.

Configuration access with defaults. All keys under :gettext_ts.

The extractable translation macro, with a runtime override hook.

Mix Tasks

Generates typed TypeScript catalogs from the Gettext PO tree.

Extracts t("...") msgids from frontend TypeScript/TSX files into the default domain's POT, then runs mix gettext.merge so every locale's PO picks them up.