Skip to content
F fluenti

@fluenti/cli

Extract messages from source files.

Supports:

  • t() and t` ` calls
  • <Trans message="..."> components
  • <Plural> components
  • v-t directive (Vue)

Compile message catalogs to optimized JavaScript modules.

Input: JSON or PO catalog files Output: ES modules with string literals and template functions

Show translation progress as a table.

import { extractFromVue, extractFromTsx } from '@fluenti/cli'
import { updateCatalog, compileCatalog } from '@fluenti/cli'
import { readJsonCatalog, writeJsonCatalog } from '@fluenti/cli'
import { readPoCatalog, writePoCatalog } from '@fluenti/cli'

Extract messages from a Vue SFC string.

Extract messages from a TSX/JSX string.

Update a catalog with newly extracted messages. Returns { catalog, result } where result contains added, unchanged, and obsolete counts.

Compile a catalog to an optimized JavaScript module string.