Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Make project translatable #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
78 changes: 78 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Crowdin Action

on:
push:
branches: [ crowdin-trigger ]
schedule:
- cron: "0 16 * * *"
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v3

- name: crowdin action
uses: crowdin/[email protected]
continue-on-error: true
with:
# Upload sources to Crowdin
upload_sources: true
# Upload translations to Crowdin
upload_translations: false #default false
# Use this option to upload translations for a single specified language
upload_language: en
# Automatically approves uploaded translations
auto_approve_imported: true
# Defines whether to add translation if it is equal to source string in Crowdin project
import_eq_suggestions: true
# download translation options
download_translations: true
# Use this option to download translations for a single specified language
# download_language: # optional
# Skip untranslated strings in exported files (does not work with .docx, .html, .md and other document files)
skip_untranslated_strings: false
# Omit downloading not fully downloaded files
skip_untranslated_files: false
# Include approved translations only in exported files. If not combined with --skip-untranslated-strings option, strings without approval are fulfilled with the source language
# export_only_approved: # default is false
# Download translations with pushing to branch
push_translations: true
# Commit message for download translations
commit_message: "chore: New Crowdin translations"
# To download translations to the specified version branch
localization_branch_name: l10n_develop
# Make pull request of Crowdin translations
# Create pull request after pushing to branch
create_pull_request: true
# The title of the new pull request
pull_request_title: "chore: New Crowdin translations to review and merge"
# The contents of the pull request
# pull_request_body: # optional
# To add labels for created pull request
pull_request_labels: "translations"
# Create pull request to specified branch instead of default one
pull_request_base_branch_name: develop
# global options
# Option to upload or download files to the specified version branch in your Crowdin project
# crowdin_branch_name: # optional
# Option to specify a path to user-specific credentials, without / at the beginning
# identity: # optional
# Option to specify a path to the configuration file, without / at the beginning
# config: # optional
# Option to preview the list of managed files
# dryrun_action: # default is false
# Numerical ID of the project
# project_id: # optional
# Personal access token required for authentication
# token: # optional
# Base URL of Crowdin server for API requests execution
#base_url: 'https://crowdin.com'
# Path to your project directory on a local machine
#base_path: '/openfoodfacts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}