This action allows you to manage and synchronize localization resources with your Crowdin project, using better-crowdin CLI
- Upload sources to Crowdin.
- Upload translations to Crowdin.
- Download translations from Crowdin.
- Delete branch from Crowdin
Set up a workflow in .github/workflows/crowdin.yml (or add a job to your existing workflows).
Read the Configuring a workflow article for more details on how to create and set up custom workflows.
name: Crowdin Action
on:
push:
branches: [ master ]
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: crowdin action
uses: ardeois/better-crowdin-action@v1.1
with:
action: 'upload sources'
The default action is to upload sources. Though, you can set different actions through the “with” options. If you don't want to upload your sources to Crowdin, just update the action
option.
- name: crowdin action
with:
# Define command action ('delbranch', 'download', 'upload sources', 'upload translations', 'sync').
action: 'upload sources'
# Crowdin configuration file path [crowdin.yml]
config: './crowdin.yml'
# Crowdin branch to use with command (defaults to current ref from `github.ref` without `refs/heads/` prefix).
branch: '<branch-name>'
# Do not execute write operations on crowdin
dry_run: true
# Make "base_path" property relative to config file path
relative_path: true
# Print script-aware outputs (no colors, no human friendly info)
porcelain: true
# Ignore any script error. This could be useful for `delbranch` in case the branch does not exists
ignore_errors: true
For more detailed descriptions of these options, see action.yml
.
We are happy to accept contributions. To contribute please do the following:
- Fork the repository on GitHub.
- Decide which code you want to submit. Commit your changes and push to the new branch.
- Ensure that your code adheres to standard conventions, as used in the rest of the library.
- Submit a pull request with your patch on Github.