diff --git a/Dockerfile b/Dockerfile index b0c1c4a..dc129de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM crowdin/cli:4.14.4 +FROM crowdin/cli:5.0.0-next.5 RUN apk --no-cache add curl git git-lfs jq gnupg su-exec; diff --git a/README.md b/README.md index 4db57ea..f8543c7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,21 @@ This action allows you to easily integrate and automate the localization of your - Creates a PR with the translations. - Run any [Crowdin CLI](https://crowdin.github.io/crowdin-cli/commands/crowdin) command. +## Crowdin CLI 5 + +> [!IMPORTANT] +> This is a **pre-release** version of the action (`v3`) that runs on [Crowdin CLI 5](https://github.com/crowdin/crowdin-cli/releases) — a complete rewrite that starts instantly and no longer requires Java. The command tree, the `crowdin.yml` configuration file, and the exit codes stay the same, so most workflows carry over unchanged. +> +> If you pass custom arguments via `command`, `command_args`, or any `*_args` input, review the following breaking changes: +> +> - The `pre-translate` command is now `auto-translate` (no alias). +> - `auto-translate`: the `--translate-untranslated-only` option was removed — use `--scope` instead (untranslated is the default). +> - `--plain` was removed — use the global `--output plain` option instead. +> - Redundant negatable flags were removed — only the form that changes the default behavior is kept (e.g. `--auto-update` was removed while `--no-auto-update` stays; `--no-auto-approve-imported`, `--no-import-eq-suggestions`, `--no-translate-hidden`, and `--no-auto-tag` were removed). The defaults are unchanged, so simply drop the removed form. +> - `--preserve-hierarchy` was removed — set `preserve_hierarchy: true` in your configuration file instead (`--no-preserve-hierarchy` still works). +> +> See the [Crowdin CLI 5 release notes](https://github.com/crowdin/crowdin-cli/releases) for the full list of changes. + ## Usage Set up a workflow in *.github/workflows/crowdin.yml* (or add a job to your existing workflows). @@ -60,7 +75,7 @@ jobs: uses: actions/checkout@v4 - name: crowdin action - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -213,9 +228,9 @@ You can also run any other Crowdin CLI command by specifying the `command` and ` ```yaml - name: crowdin action - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: - command: 'pre-translate' + command: 'auto-translate' command_args: '-l uk --method tm --branch main' # Access the command output in subsequent steps (optional) diff --git a/docs/AI.md b/docs/AI.md index 2782e17..45bad0b 100644 --- a/docs/AI.md +++ b/docs/AI.md @@ -49,7 +49,7 @@ jobs: - uses: actions/checkout@v4 - name: Upload Sources to Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -62,16 +62,16 @@ jobs: CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} - name: Pre-translate with AI - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: - command: 'pre-translate' + command: 'auto-translate' command_args: '--method ai --ai-prompt=${{ secrets.PROMPT_ID }}' env: CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} - name: Download Translations from Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: false upload_translations: false diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index fcc79fd..52dd968 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -51,7 +51,7 @@ jobs: uses: actions/checkout@v4 - name: Synchronize with Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: true @@ -85,7 +85,7 @@ jobs: uses: actions/checkout@v4 - name: Synchronize with Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -117,7 +117,7 @@ jobs: uses: actions/checkout@v4 - name: Crowdin sync - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -151,7 +151,7 @@ jobs: uses: actions/checkout@v4 - name: Crowdin push - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -178,7 +178,7 @@ jobs: uses: actions/checkout@v4 - name: Crowdin push - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -224,7 +224,7 @@ jobs: restore-keys: crowdin-${{ github.ref_name }}- - name: Crowdin push - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: false @@ -263,7 +263,7 @@ jobs: uses: actions/checkout@v4 - name: Crowdin pull - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: false upload_translations: false @@ -298,7 +298,7 @@ jobs: uses: actions/checkout@v4 - name: Crowdin pull - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: download_translations: false download_bundle: 1 @@ -334,7 +334,7 @@ jobs: uses: actions/checkout@v4 - name: Synchronize with Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: true @@ -364,7 +364,7 @@ By default, the Action looks for the `crowdin.yml` file in the repository root. # ... - name: Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: config: '.github/crowdin.yml' #... @@ -396,7 +396,7 @@ jobs: uses: actions/checkout@v4 - name: Matrix - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: false upload_translations: false @@ -442,7 +442,7 @@ jobs: fetch-depth: 0 - name: Synchronize with Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true upload_translations: true @@ -527,7 +527,7 @@ There is a possibility to get the URL, number, and creation status of the Pull R ```yaml # ... - name: Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 id: crowdin-download with: download_translations: true @@ -588,7 +588,7 @@ jobs: permission-pull-requests: write - name: Synchronize with Crowdin - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: upload_sources: true download_translations: true @@ -627,7 +627,7 @@ jobs: uses: actions/checkout@v4 - name: Check translation progress - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: command: 'status translation' command_args: '--fail-if-incomplete' @@ -654,16 +654,16 @@ jobs: uses: actions/checkout@v4 - name: Pre-translate - uses: crowdin/github-action@v2 + uses: crowdin/github-action@v3.0.0-next.2 with: - command: 'pre-translate' + command: 'auto-translate' command_args: '--language uk --method tm' env: CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} ``` -Visit the [official documentation](https://crowdin.github.io/crowdin-cli/commands/crowdin-pre-translate) to learn more about the available pre-translation options. +Visit the [official documentation](https://crowdin.github.io/crowdin-cli/commands/crowdin-auto-translate) to learn more about the available pre-translation options. ### Run test workflows on all commits of a PR