sync_translations
Sync project translations by adding new languages and updating changed strings. Uses a dry-run preview to compare files and translate only new content.
Instructions
Add new languages or sync existing translations via LangAPI. The server compares each file's current content against its previous translation and only translates what's new or changed. Default is dry_run=true for preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, only preview changes without syncing. Default: true (safe mode) | |
| source_lang | Yes | Source language code (e.g., 'en', 'pt-BR') | |
| project_path | No | Root path of the project. Defaults to current working directory. | |
| target_langs | Yes | Target language codes to translate to. Can include NEW languages not yet in the project (e.g., ['cs', 'de'] to add Czech and German) | |
| glossary_file | No | Path to a glossary file (CSV with source_term/language/target_term columns, or structured JSON with doNotTranslate + terms). Terms relevant to each target language are attached to that language's request so brand names and domain terms translate consistently. Unverified languages are left untouched. | |
| write_to_files | No | If true, write translated content back to local files |