name: Crowdin Client UI Download on: workflow_dispatch: schedule: # runs every day at 12:15 PM UTC - cron: '15 12 * * *' jobs: i18n-download-client-ui-translations: name: Client runs-on: ubuntu-18.04 steps: - name: Checkout Source Files uses: actions/checkout@v2 with: token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} - name: Install Dependencies working-directory: ./tools run: | cd ./crowdin npm ci ##### Download Chinese ##### - name: Crowdin Download Chinese 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: zh-CN skip_untranslated_files: false export_only_approved: true push_translations: false # pull-request create_pull_request: false # global options config: './config/crowdin/client/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_CLIENT }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} # Convert Simplified Chinese to Traditional # - name: Generate Translations uses: ./tools/crowdin/actions/convert-chinese ##### 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: false export_only_approved: true push_translations: false # pull-request create_pull_request: false # global options config: './config/crowdin/client/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_CLIENT }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} ##### 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: false export_only_approved: true push_translations: false # pull-request create_pull_request: false # global options config: './config/crowdin/client/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_CLIENT }} 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: false export_only_approved: true push_translations: false # pull-request create_pull_request: false # global options config: './config/crowdin/client/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_CLIENT }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} # Create Commit - name: Commit Changes env: EMAIL: ${{ secrets.ACTIONS_CAMPERBOT_EMAIL }} run: | git checkout -b i18n-sync-client git config --global user.name "camperbot" git config --global user.email "$EMAIL" git add . git diff-index --quiet HEAD || git commit -m "chore(i18n,learn): update translations" git push -u origin i18n-sync-client -f # Generate PR - all languages should go ABOVE this. # - name: Create PR uses: ./tools/crowdin/actions/pr-creator with: github-token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} branch: 'i18n-sync-client' owner-repo: 'freeCodeCamp/freeCodeCamp' base: 'main' title: 'chore(i18n,client): processed translations' body: 'This PR was opened auto-magically by Crowdin.' labels: 'crowdin-sync, scope: UI' team_reviewers: 'i18n'