This is a new major release that we've been working on for some time. It introduces some breaking changes (see below), but in most cases your workflows should continue working without adjustments. Still, there may be a few hiccups, so we strongly recommend testing in a non-production environment. Please share your feedback on this approach - it’s fairly experimental (then again, the whole solution started as one).
The main change concerns how we download translation files from Lokalise. We no longer use Lokalise CLIv2, and instead rely on the lightweight Lokex solution (https://github.com/bodrovis/lokex) built specifically for file exchange. The main reason is more robust error handling: tracking issues with the CLI became increasingly unreliable. With Lokex, the Go download script is self-contained, making error handling and retries more predictable.
Breaking changes:
additional_paramsno longer accepts CLI flags (since we don’t rely on the CLI). Instead, it must be JSON matching the Download files endpoint (https://developers.lokalise.com/reference/download-files). The parameter names are similar but follow API naming conventions.
Previously you had:
additional_params: |
--indentation=2sp
--export-empty-as=skip
--export-sort=a_z
--replace-breaks=false
--language-mapping=[{"original_language_iso":"en_US","custom_language_iso":"en-US"}]Now you need to provide JSON:
additional_params: >
{
"indentation": "2sp",
"export_empty_as": "skip",
"export_sort": "a_z",
"replace_breaks": false,
"language_mapping": [
{"original_language_iso": "en_US", "custom_language_iso": "en-US"}
]
}When in doubts, refer to the API docs.
If the JSON is invalid, the tool will fail fast (it won’t attempt a download with broken API parameters).
download_timeouthas been redefined: it now specifies the timeout for the entire download process. Default:600(10 minutes).
New features:
- Added a new
http_timeoutparameter that specifies timeout for each HTTP operation (for example, HTTP call to the Download endpoint). Default value is120(2 minutes). - Added a new
async_poll_initial_waitparameter: number of seconds to wait before polling the async download process for the first time. Default is1(1 second). - Added a new
async_poll_max_waitparameter: timeout for polling the async download process. Default is120(2 minutes).
Note: poll-related timeouts are ignored if async_mode: false.