Extract messages
verbaly_extractScans source files to add new messages to locale catalogs and refresh generated i18n types; writes catalogs unless dryRun is set, and prune removes unreferenced keys with translations.
Instructions
Scan the source files, add new messages to the locale catalogs and refresh the generated types (what verbaly extract does). Writes catalog files unless dryRun is set. prune drops keys no longer referenced in the code, translations included.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Project root holding verbaly.config (defaults to the server working directory) | |
| prune | No | Drop keys no longer referenced (deletes their translations) | |
| dryRun | No | Report what would change, write nothing |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lock | No | This run created verbaly.lock, moved an older state file (from) into it, or rewrote it whole after a merge conflict (merged): it belongs in git with the catalogs, so tell the user to commit it | |
| added | Yes | ||
| dryRun | Yes | ||
| inCode | Yes | How many of those messages the code writes as text: 0 when the project keeps its text in the catalog and reads it with t(key) | |
| pruned | Yes | ||
| escaped | Yes | Plural or format blocks inside a tagged template, which render as literal text | |
| locales | Yes | ||
| renamed | Yes | Tagged templates on t under another name (const tr = useT()): never extracted, so they stay in the source language until the binding is named t | |
| messages | Yes | Messages the source catalog holds after this run | |
| replaced | Yes | Source texts the code wrote over: before is what the catalog said, code is the text that ships. An edit made in the code reads like this too | |
| unparsed | Yes | Source files the parser could not read: their messages are not extracted, and prune drops nothing until they parse | |
| collisions | Yes | Keys written with more than one text: every place shows the text of the first site, so give each text its own key | |
| positional | Yes | Messages that hand a translator a nameless value like {_0}: put the value in a named variable first | |
| stateProblem | No | The state file could not be read or written: the catalogs were written, drafts and outdated tracking were not |