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 upload translation files to 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 upload 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 Upload files endpoint (https://developers.lokalise.com/reference/upload-a-file). The parameter names are similar but follow API naming conventions.
Previously you had:
additional_params: |
--convert-placeholders
--hidden-from-contributorsNow you need to provide JSON:
additional_params: >
{
"convert_placeholders": true,
"hidden_from_contributors": true,
"tags": ["custom", "another_tag"]
}When in doubts, refer to the API docs.
If the JSON is invalid, the tool will fail fast (it won’t attempt an upload with broken API parameters).
upload_timeouthas been redefined: it now specifies the timeout for the entire upload 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 Upload endpoint). Default value is120(2 minutes). - Added a new
poll_initial_waitparameter: number of seconds to wait before polling the upload process for the first time. Default is1(1 second). - Added a new
poll_max_waitparameter: timeout for polling the upload process. Default is120(2 minutes).
Note: poll-related timeouts are ignored if skip_polling: true.