Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions docs/AGENTIC_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ This document summarizes the important changes when migrating from the pre-agent
## What changed (high-level)

- New translation service: `--service=agent`.
- New preferred flag for same-format workflows: `--format=<one-format>`.
- Legacy format flags still work for conversions: `--srcFormat` / `--targetFormat` (intentionally not promoted in READMEs).
- `--format=<one-format>` is the only format flag; the legacy `--srcFormat` / `--targetFormat` flags have been removed.
- `json` is a supported format and is treated the same as `nested-json` (implementation-wise).

## New agent workflow (`--service=agent`)
Expand All @@ -21,17 +20,15 @@ The first run exits with a non-zero code by design, so CI/CD can detect that tra
Notes:
- Empty translations are supported by piping an empty line (line count still must match).

## Format flags: `--format` vs legacy `--srcFormat/--targetFormat`
## Format flag: `--format`

- Use `--format=<format>` when source + target use the **same** file format.
- Use legacy `--srcFormat=<format> --targetFormat=<format>` when doing **format conversion** (e.g. XML → iOS strings).
- `--format` accepts **exactly one** format (no separators, no conversions).
- `--format=<format>` is required and is used for both source and target files.
- `--format` accepts **exactly one** format (no separators, no conversions between different formats).

## Practical migration checklist

- Replace same-format calls:
- Replace legacy calls:
- From: `--srcFormat=<x> --targetFormat=<x>`
- To: `--format=<x>`
- For format conversions, keep using legacy flags.
- To: `--format=<x>` (only supported when source and target use the same format)
- If you relied on `--prompt`, remove it from scripts and automation (flag removed).
- Consider switching scripts to `--service=agent` if you want the agentic two-step workflow.
17 changes: 0 additions & 17 deletions sample-scripts/android/app/src/main/res/values-de/strings.xml

This file was deleted.

18 changes: 0 additions & 18 deletions sample-scripts/android/app/src/main/res/values-es/strings.xml

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions sample-scripts/android/app/src/main/res/values/strings.xml

This file was deleted.

25 changes: 0 additions & 25 deletions sample-scripts/android_to_ios.sh

This file was deleted.

38 changes: 0 additions & 38 deletions sample-scripts/csv/.babelish

This file was deleted.

4 changes: 0 additions & 4 deletions sample-scripts/csv/de.json

This file was deleted.

11 changes: 0 additions & 11 deletions sample-scripts/csv/de.po

This file was deleted.

2 changes: 0 additions & 2 deletions sample-scripts/csv/de.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions sample-scripts/csv/en.json

This file was deleted.

9 changes: 0 additions & 9 deletions sample-scripts/csv/en.strings

This file was deleted.

5 changes: 0 additions & 5 deletions sample-scripts/csv/en.xml

This file was deleted.

5 changes: 0 additions & 5 deletions sample-scripts/csv/es.arb

This file was deleted.

3 changes: 0 additions & 3 deletions sample-scripts/csv/google-docs.csv

This file was deleted.

4 changes: 0 additions & 4 deletions sample-scripts/csv/single-lang-en.csv

This file was deleted.

4 changes: 0 additions & 4 deletions sample-scripts/csv/single-lang-es.csv

This file was deleted.

4 changes: 0 additions & 4 deletions sample-scripts/csv/translations.csv

This file was deleted.

18 changes: 0 additions & 18 deletions sample-scripts/csv_to_other_formats.sh

This file was deleted.

21 changes: 0 additions & 21 deletions sample-scripts/ios/Localizable/Base.lproj/Localizable.strings

This file was deleted.

21 changes: 0 additions & 21 deletions sample-scripts/ios/Localizable/de.lproj/Localizable.strings

This file was deleted.

21 changes: 0 additions & 21 deletions sample-scripts/ios/Localizable/es.lproj/Localizable.strings

This file was deleted.

11 changes: 0 additions & 11 deletions sample-scripts/po-generic/nested-fruits.po

This file was deleted.

6 changes: 0 additions & 6 deletions sample-scripts/po-generic/nested-fruits.yml

This file was deleted.

3 changes: 0 additions & 3 deletions sample-scripts/po_generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ BASE_DIR=po-generic
# Run "npm install --global attranslate" before you try this example.
attranslate --srcFile=$BASE_DIR/en.po --srcLng=English --format=po --targetFile=$BASE_DIR/es.po --targetLng=Spanish --service=agent
attranslate --srcFile=$BASE_DIR/en.po --srcLng=English --format=po --targetFile=$BASE_DIR/de.po --targetLng=German --service=agent

# Convert a YAML to PO (just for the sake of test-coverage)
attranslate --srcFile="$BASE_DIR/nested-fruits.yml" --srcFormat=yaml --srcLng=x --targetFile=$BASE_DIR/nested-fruits.po --targetFormat=po --targetLng=x --service=sync-without-translate
5 changes: 0 additions & 5 deletions sample-scripts/xml-generic/nested-fruits.strings

This file was deleted.

6 changes: 0 additions & 6 deletions sample-scripts/xml-generic/nested-fruits.xml

This file was deleted.

3 changes: 0 additions & 3 deletions sample-scripts/xml_generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ BASE_DIR=xml-generic
# Run "npm install --global attranslate" before you try this example.
attranslate --srcFile=$BASE_DIR/en.xml --srcLng=English --format=xml --targetFile=$BASE_DIR/ar.xml --targetLng=Arabic --service=agent
attranslate --srcFile=$BASE_DIR/en.xml --srcLng=English --format=xml --targetFile=$BASE_DIR/de.xml --targetLng=German --service=agent

# Convert an iOS string file into an XML (just for the sake of test-coverage)
attranslate --srcFormat=ios-strings --srcFile=$BASE_DIR/nested-fruits.strings --srcLng=en --targetFormat=xml --targetFile=$BASE_DIR/nested-fruits.xml --targetLng=en --service=sync-without-translate
11 changes: 0 additions & 11 deletions sample-scripts/yaml/nested-fruits.json

This file was deleted.

6 changes: 0 additions & 6 deletions sample-scripts/yaml/nested-fruits.yml

This file was deleted.

3 changes: 0 additions & 3 deletions sample-scripts/yaml_ecommerce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ node search_replace.js "yaml/es_ecommerce.yml" "en:" "es:" # postprocessing
node search_replace.js "yaml/de_ecommerce.yml" "de:" "en:" # preprocessing
attranslate --srcFile=yaml/en_ecommerce.yml --srcLng=English --format=yaml --targetFile=yaml/de_ecommerce.yml --targetLng=German --service=agent
node search_replace.js "yaml/de_ecommerce.yml" "en:" "de:" # postprocessing

# Convert a JSON to YML (just for the sake of test-coverage)
attranslate --srcFile="yaml/nested-fruits.json" --srcFormat=json --srcLng=x --targetFile=yaml/nested-fruits.yml --targetFormat=yaml --targetLng=x --service=sync-without-translate
Loading
Loading