@fluenti/cli
Commands
Section titled “Commands”fluenti extract
Section titled “fluenti extract”Extract messages from source files.
Supports:
t()andt` `calls<Trans message="...">components<Plural>componentsv-tdirective (Vue)
fluenti compile
Section titled “fluenti compile”Compile message catalogs to optimized JavaScript modules.
Input: JSON or PO catalog files Output: ES modules with string literals and template functions
fluenti stats
Section titled “fluenti stats”Show translation progress as a table.
Programmatic API
Section titled “Programmatic API”import { extractFromVue, extractFromTsx } from '@fluenti/cli'import { updateCatalog, compileCatalog } from '@fluenti/cli'import { readJsonCatalog, writeJsonCatalog } from '@fluenti/cli'import { readPoCatalog, writePoCatalog } from '@fluenti/cli'extractFromVue(code, filename)
Section titled “extractFromVue(code, filename)”Extract messages from a Vue SFC string.
extractFromTsx(code, filename)
Section titled “extractFromTsx(code, filename)”Extract messages from a TSX/JSX string.
updateCatalog(existing, extracted)
Section titled “updateCatalog(existing, extracted)”Update a catalog with newly extracted messages. Returns { catalog, result } where result contains added, unchanged, and obsolete counts.
compileCatalog(catalog, locale)
Section titled “compileCatalog(catalog, locale)”Compile a catalog to an optimized JavaScript module string.