eloqnt/cli
eloqnt translate
Uses AIFill in missing translations across your target locales.
A run translates every string that doesn't have a translation yet, leaving existing translations untouched. Before translating, it's recommended to run eloqnt review first, so mistakes in source strings don't spread out.
eloqnt translate
✔ Context enrichment complete
✔ Styleguides loaded (global, es)
✔ Translated de, es via eloqnt/engine (hosted)
✔ Post-translation checks done
messages/
de.json 2 translated
es.json 2 translated
✔ Project fully translated
Each run applies the following steps:
- If
srcPathis configured, source strings are enriched with contextual information from their call sites about how they're used - All applicable styleguides are loaded to steer tone, terminology, and consistency
- Post-translation checks guard against translation errors and will retry rejected translations automatically
Values that aren't text
Booleans and numbers in a messages file aren't translatable, so they're never sent for translation. A target locale keeps its own value if it has one. If it doesn't, the value is copied over from the source locale as-is. When a copied value is locale-specific (e.g. a text-direction flag), correct it once in the target file and later runs will keep your value.
Flags
| --id | string | (Re-)translate these message ids (comma-separated) |
| --locale | string | Restrict to these target locales (comma-separated) |
| --config | string | Path to the eloqnt config file (defaults to .eloqnt/config.{ts,mts,js,mjs}) |
| --json | boolean | Output the result as JSON |