2021-01-25 03:09:57 +00:00
|
|
|
name: Crowdin Curriculum Download
|
2021-01-12 18:20:54 +00:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2021-03-04 20:31:40 +00:00
|
|
|
schedule:
|
2021-03-05 03:54:17 +00:00
|
|
|
# runs every day at 12:30 PM UTC
|
2021-04-02 12:16:00 +00:00
|
|
|
- cron: '30 12 * * *'
|
2021-01-12 18:20:54 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
i18n-download-curriculum-translations:
|
2021-03-13 16:44:19 +00:00
|
|
|
name: Curriculum
|
2021-11-02 11:49:50 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-01-12 18:20:54 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Source Files
|
|
|
|
uses: actions/checkout@v2
|
2021-04-08 06:00:29 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
2021-01-21 06:00:16 +00:00
|
|
|
|
2021-03-15 22:40:48 +00:00
|
|
|
- name: Install Dependencies
|
|
|
|
working-directory: ./tools
|
|
|
|
run: |
|
|
|
|
cd ./crowdin
|
|
|
|
npm ci
|
|
|
|
|
2021-02-17 02:11:42 +00:00
|
|
|
##### Download Chinese #####
|
|
|
|
- name: Crowdin Download Chinese Translations
|
2021-01-12 18:20:54 +00:00
|
|
|
uses: crowdin/github-action@master
|
|
|
|
# options: https://github.com/crowdin/github-action/blob/master/action.yml
|
|
|
|
with:
|
|
|
|
# uploads
|
|
|
|
upload_sources: false
|
|
|
|
upload_translations: false
|
|
|
|
auto_approve_imported: false
|
|
|
|
import_eq_suggestions: false
|
|
|
|
|
|
|
|
# downloads
|
|
|
|
download_translations: true
|
2021-02-17 02:11:42 +00:00
|
|
|
download_language: zh-CN
|
2021-02-11 20:24:18 +00:00
|
|
|
skip_untranslated_files: true
|
2021-01-12 18:20:54 +00:00
|
|
|
export_only_approved: true
|
2021-01-21 06:00:16 +00:00
|
|
|
|
2021-02-17 02:11:42 +00:00
|
|
|
push_translations: false
|
2021-01-21 06:00:16 +00:00
|
|
|
|
2021-01-12 18:20:54 +00:00
|
|
|
# pull-request
|
2021-02-17 02:11:42 +00:00
|
|
|
create_pull_request: false
|
|
|
|
|
|
|
|
# global options
|
|
|
|
config: './config/crowdin/curriculum/crowdin.yml'
|
|
|
|
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
|
|
|
|
|
|
|
|
# Uncomment below to debug
|
|
|
|
# dryrun_action: true
|
|
|
|
|
|
|
|
env:
|
2021-04-08 06:00:29 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
2021-02-17 02:11:42 +00:00
|
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }}
|
|
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }}
|
|
|
|
|
2021-03-15 22:40:48 +00:00
|
|
|
# Convert Simplified Chinese to Traditional #
|
|
|
|
- name: Generate Translations
|
|
|
|
uses: ./tools/crowdin/actions/convert-chinese
|
|
|
|
|
2021-02-17 02:11:42 +00:00
|
|
|
##### Download Espanol #####
|
|
|
|
- name: Crowdin Download Espanol Translations
|
|
|
|
uses: crowdin/github-action@master
|
|
|
|
# options: https://github.com/crowdin/github-action/blob/master/action.yml
|
|
|
|
with:
|
|
|
|
# uploads
|
|
|
|
upload_sources: false
|
|
|
|
upload_translations: false
|
|
|
|
auto_approve_imported: false
|
|
|
|
import_eq_suggestions: false
|
|
|
|
|
|
|
|
# downloads
|
|
|
|
download_translations: true
|
|
|
|
download_language: es-EM
|
|
|
|
skip_untranslated_files: true
|
|
|
|
export_only_approved: true
|
|
|
|
|
2021-04-02 12:16:00 +00:00
|
|
|
push_translations: false
|
2021-02-17 02:11:42 +00:00
|
|
|
|
|
|
|
# pull-request
|
2021-01-21 06:00:16 +00:00
|
|
|
create_pull_request: false
|
2021-01-12 18:20:54 +00:00
|
|
|
|
|
|
|
# global options
|
2021-02-10 18:06:13 +00:00
|
|
|
config: './config/crowdin/curriculum/crowdin.yml'
|
2021-01-12 18:20:54 +00:00
|
|
|
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
|
|
|
|
|
|
|
|
# Uncomment below to debug
|
|
|
|
# dryrun_action: true
|
|
|
|
|
|
|
|
env:
|
2021-04-08 06:00:29 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
2021-01-12 18:20:54 +00:00
|
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }}
|
|
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }}
|
2021-06-14 17:07:21 +00:00
|
|
|
|
|
|
|
##### Download Italian #####
|
|
|
|
- name: Crowdin Download Italian Translations
|
|
|
|
uses: crowdin/github-action@master
|
|
|
|
# options: https://github.com/crowdin/github-action/blob/master/action.yml
|
|
|
|
with:
|
|
|
|
# uploads
|
|
|
|
upload_sources: false
|
|
|
|
upload_translations: false
|
|
|
|
auto_approve_imported: false
|
|
|
|
import_eq_suggestions: false
|
|
|
|
|
|
|
|
# downloads
|
|
|
|
download_translations: true
|
|
|
|
download_language: it
|
|
|
|
skip_untranslated_files: true
|
|
|
|
export_only_approved: true
|
|
|
|
|
|
|
|
push_translations: false
|
|
|
|
|
|
|
|
# pull-request
|
|
|
|
create_pull_request: false
|
|
|
|
|
|
|
|
# global options
|
|
|
|
config: './config/crowdin/curriculum/crowdin.yml'
|
|
|
|
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
|
|
|
|
|
|
|
|
# Uncomment below to debug
|
|
|
|
# dryrun_action: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
|
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }}
|
|
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }}
|
|
|
|
|
|
|
|
##### Download Brazilian Portuguese #####
|
|
|
|
- name: Crowdin Download Portuguese (Brazilian) Translations
|
|
|
|
uses: crowdin/github-action@master
|
|
|
|
# options: https://github.com/crowdin/github-action/blob/master/action.yml
|
|
|
|
with:
|
|
|
|
# uploads
|
|
|
|
upload_sources: false
|
|
|
|
upload_translations: false
|
|
|
|
auto_approve_imported: false
|
|
|
|
import_eq_suggestions: false
|
|
|
|
|
|
|
|
# downloads
|
|
|
|
download_translations: true
|
|
|
|
download_language: pt-BR
|
|
|
|
skip_untranslated_files: true
|
|
|
|
export_only_approved: true
|
|
|
|
|
|
|
|
push_translations: false
|
|
|
|
|
|
|
|
# pull-request
|
|
|
|
create_pull_request: false
|
|
|
|
|
|
|
|
# global options
|
|
|
|
config: './config/crowdin/curriculum/crowdin.yml'
|
|
|
|
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
|
|
|
|
|
|
|
|
# Uncomment below to debug
|
|
|
|
# dryrun_action: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
|
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }}
|
|
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }}
|
2021-03-04 20:31:40 +00:00
|
|
|
|
2021-04-02 12:16:00 +00:00
|
|
|
# Create Commit
|
|
|
|
- name: Commit Changes
|
|
|
|
env:
|
|
|
|
EMAIL: ${{ secrets.ACTIONS_CAMPERBOT_EMAIL }}
|
|
|
|
run: |
|
|
|
|
git checkout -b i18n-sync-curriculum
|
|
|
|
git config --global user.name "camperbot"
|
|
|
|
git config --global user.email "$EMAIL"
|
|
|
|
git add .
|
2021-04-08 06:00:29 +00:00
|
|
|
git diff-index --quiet HEAD || git commit -m "chore(i18n,curriculum): update translations"
|
2021-04-02 12:16:00 +00:00
|
|
|
git push -u origin i18n-sync-curriculum -f
|
|
|
|
|
2021-03-04 20:31:40 +00:00
|
|
|
# Generate PR - all languages should go ABOVE this. #
|
|
|
|
- name: Create PR
|
2021-03-09 16:57:40 +00:00
|
|
|
uses: ./tools/crowdin/actions/pr-creator
|
2021-03-04 20:31:40 +00:00
|
|
|
with:
|
2021-03-04 22:46:34 +00:00
|
|
|
github-token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
|
2021-03-13 16:44:19 +00:00
|
|
|
branch: 'i18n-sync-curriculum'
|
2021-03-09 16:57:40 +00:00
|
|
|
owner-repo: 'freeCodeCamp/freeCodeCamp'
|
|
|
|
base: 'main'
|
2021-03-18 15:31:05 +00:00
|
|
|
title: 'chore(i18n,curriculum): processed translations'
|
2021-03-09 16:57:40 +00:00
|
|
|
body: 'This PR was opened auto-magically by Crowdin.'
|
2021-03-13 16:44:19 +00:00
|
|
|
labels: 'crowdin-sync'
|
2021-03-26 19:52:44 +00:00
|
|
|
team_reviewers: 'i18n'
|