Releases: lokalise/lokalise-pull-action
Version 4.2.0
- The action now properly detects the base branch it's running on, even for PRs (should fix issues for non-manual triggers)
- Stronger checks for translation paths
Version 4.1.0
New feature: file_ext can now accept multiple file extensions:
file_ext: json
# Or (useful when the bundle contains miltiple file types, for example iOS bundles)
file_ext: |
strings
stringsdictVersion 4.0.0
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.
Version 4.0.0-beta.1
Use Lokex instead of CLIv2 (#27) * +lokex on download * updates [skip ci] * updates [skip ci] * new params * update go * update downloader * rename timeout * lokex v1 * minor updates * dependabot, updates * dependabot, updates * update github script to v8 * update readme [skip ci] * update bins
Version 3.14.0
Make error handling more robust. Also added new params:
pr_draft— Whether to create the pull request as a draft. Acceptstrueorfalse. Defaults tofalse.pr_assignees— Comma-separated list of GitHub usernames to assign to the created pull request. Assignees will be added immediately after the PR is created. Defaults to an empty string (no assignees).
Version 3.13.0
Added new params:
post_process_command— A shell command that runs after pulling translation files from Lokalise but before committing them. This allows you to perform custom transformations, cleanup, replacements, or validations on the downloaded files. The command is executed in the root of your repository and has access to several environment variables (TRANSLATIONS_PATH,BASE_LANG,FILE_FORMAT,FILE_EXT,FLAT_NAMING,PLATFORM).- Please note that this is an experimental feature. You are fully responsible for the logic and behavior of any script executed through this option. These scripts run in your own repository context, under your control. If something breaks or behaves unexpectedly, we cannot guarantee support or ensure the security of the code being executed.
- If your command requires a custom interpreter (e.g. running tools that are not available by default on GitHub-hosted runners), you are responsible for setting it up yourself before the command is executed.
# This will run replace_test.py file from the scripts folder in the root of your repo
post_process_command: "python scripts/replace_test.py"
# Or using a simple shell one-liner:
post_process_command: "sed -i 's/test/REPLACED/g' messages/fr.json"
# You can also run custom tools or binaries:
post_process_command: "./scripts/postprocess"post_process_strict— Whether to fail the workflow if thepost_process_commandfails (non-zero exit code). If set totrue, the workflow will exit immediately on failure. Defaults tofalse.
Version 3.12.0
Added new params:
pr_reviewers— Optional comma-separated list of GitHub usernames to request as reviewers on the pull request. Only individual users can be specified here. Reviewers must have access to the repository.pr_teams_reviewers— Optional comma-separated list of team slugs (e.g.,backend,qa) from the same GitHub organization that owns the repository. These teams will be requested as reviewers. Has no effect for repositories not under an organization, or if the teams are not part of the org.
Version 3.11.0
Added new options:
pr_title— Title for the pull request. If not provided, defaults to "Translations update".pr_body— Body text for the pull request. If not provided, defaults to "This pull request updates translations from Lokalise".
Version 3.10.0
Allow forward slashes / in branch names
Version 3.9.1
Bugfix: Properly pass git_commit_message in the workflow