Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions docs/AI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
36 changes: 18 additions & 18 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
#...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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

Expand Down
Loading