Releases: Smartling/smartling-cli
2.5
2.4.1
2.4
2.3
Bug Fixes
- Fixed the
files pushcommand to support file upload directives.
2.2
New Features
Job-based File Uploads: The files push command now uploads all files as part of a Smartling Job by default. This provides better organization and workflow management for translation projects.
Learn more about Smartling Jobs:
Breaking Changes
The files push command includes one new flag and two updated flags:
New Flag
-j,--job <job name>- Specifies the Smartling translation job name or job UID. All files upload to this job. If not specified, defaults to "CLI uploads".
Updated Flags
-z,--authorize- Automatically authorizes the job with uploaded files and specified locales. Without this flag, the job remains unauthorized.-l,--locale <locale code>- Adds files to the job for the specified locale only. Without this flag, files are added for all project locales. Can be used multiple times:--locale fr --locale de -l es.
Recommended Usage
smartling-cli files push <file> <uri> --job <job name> [--authorize] [--locale <locale>] [flags]Backward Compatibility
CLI v2.2 maintains compatibility with the previous files push format. However, we recommend updating to the new format.
Legacy Command Behavior
smartling-cli files push <file> <uri>When using the legacy format (without job name and locale):
- Creates or reuses a job named "CLI uploads"
- Attaches the file to all project locales
- Leaves the job unauthorized
Migration Guide
-
Add the
--jobflag to existing commands and specify a job name or UID- The same job name can be used across multiple CLI calls
- CLI searches by job name and reuses existing jobs
- If a job with the same name exists in
CanceledorClosedstate, a new job is created with a timestamp suffix
-
Review locale targeting by explicitly adding the
--localeflag if you need specific locales- Without
--locale, CLI targets all project locales
- Without
-
Consider authorization by adding the
--authorizeflag if you want automatic content authorization- Without
--authorize, jobs remain unauthorized and require manual authorization
- Without
2.1
New Features
Machine Translation Commands: Added mt detect and mt translate commands for machine translation capabilities.
Enhanced Configuration Management: Implemented value resolving hierarchy for better configuration control:
- Flag values take highest priority
- Config file values override environment variables
- Environment variables override default values
- Default values serve as fallback
Other Improvements
- Updated SDK: Upgraded to the latest version of Smartling/api-sdk-go featuring a new project layout and updated MT endpoints
- Dynamic Output: Implemented output mode (dynamic/static) based on flag values for improved user experience
Bug Fixes
- Fixed an issue with the
initcommand
Breaking Changes
- Directory Flag Change: Global flag
-d, --directorywas replaced with--operation-directory
Migration Guide
Update any existing scripts or workflows that use the -d or --directory flag:
Before:
smartling-cli -d /path/to/project [command]After:
smartling-cli --operation-directory /path/to/project [command]2.0
1.7
1.6
1.5
Improvements
- #63
smartling-cli files pushwith multiple files now continues on non-critical errors.
The output for successful files is unchanged. Files that were not uploaded either because of local reasons or rejected by API will produce anUnable to upload filemessage. The exit code is0if all files were uploaded without errors,1otherwise.
An example output for 2 success and 1 failed file is:success-1.json (json) new [1 strings 1 words] Unable to upload file fail-1.json success-2.json (json) overwritten [1 strings 1 words] ERROR: failed to upload 1 files failed to upload files fail-1.json