Generates typed TypeScript catalogs from the Gettext PO tree.
Output (under :output_path):
catalog/<locale>/<domain>.ts— one file per locale AND domain. The unit of loading is the domain, not the locale: an application whose admin copy outweighs its public copy would otherwise ship the admin catalog to every visitor who never sees the admin.index.ts—locales,domains,Locale/Domain/TranslationKeytypes,loadCatalog(locale, domains?)(dynamic imports, one per chunk), andcreateTwith%{var}interpolation and an overrides layer for runtime-edited translations.react.tsx— provider +useT(domain?)hook (unlessreact: false). The provider takes adomainsprop (which chunks to load) and an optionalinitialCatalogso a server-rendered route tree is already translated before hydration.
The source locale gets no files. Its catalog is identity by construction —
msgid IS the copy — and createT already falls back to the msgid, so
writing it out is handing the copy back to itself in a file the browser
then has to download. A source locale with real PO files on disk is read
and emitted like any other.
Files are only written when content changed, so --check in CI is cheap.
Stale files under catalog/ are removed (and reported by --check): the
directory is generated output, and a renamed domain must not leave a
catalog behind that still type-checks.