From 3b2db13fa5b64746ee989fbe52175ffec15ce2f7 Mon Sep 17 00:00:00 2001 From: tilalx Date: Sun, 11 Aug 2024 18:26:48 +0200 Subject: [PATCH] add crowdin integration --- .github/workflows/crowdin.yml | 41 +++++++++++++++++++++++++++++++++++ crowdin.yml | 16 ++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/crowdin.yml create mode 100644 crowdin.yml diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml new file mode 100644 index 0000000..1c05cbb --- /dev/null +++ b/.github/workflows/crowdin.yml @@ -0,0 +1,41 @@ +# This workflow requires additional setup, see: https://jenkins.io/doc/developer/crowdin/ + +name: Crowdin Action + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +permissions: + actions: write + contents: write + pull-requests: write + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: crowdin action + uses: crowdin/github-action@v2 + with: + upload_translations: false + download_translations: true + skip_untranslated_files: true + push_translations: true + export_only_approved: true + commit_message: 'New Crowdin translations' + create_pull_request: true + pull_request_title: 'Update localization' + pull_request_labels: 'localization' + base_url: 'https://jenkins.crowdin.com' + config: 'crowdin.yml' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: 31 + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 0000000..8f8497e --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,16 @@ +files: + - source: '/src/main/resources/hudson/plugins/msbuild/**/*.properties' + ignore: + - '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.properties' + translation: '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.properties' + escape_quotes: 1 + escape_special_characters: 0 + - source: '/src/main/resources/hudson/plugins/msbuild/**/*.html' + ignore: + - '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.html' + translation: '/src/main/resources/hudson/plugins/msbuild/**/%file_name%_%two_letters_code%.html' + escape_quotes: 0 + escape_special_characters: 0 + +project_id_env: CROWDIN_PROJECT_ID +api_token_env: CROWDIN_PERSONAL_TOKEN \ No newline at end of file