From bf32f0d913bf684e0a1830328979f54ac7228639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 22 Feb 2021 00:33:29 +0300 Subject: [PATCH] sync translation of core modules --- .github/workflows/translation_modules.yml | 37 +++++++++++++++++++++++ crowdin_modules.yml | 22 ++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/translation_modules.yml create mode 100644 crowdin_modules.yml diff --git a/.github/workflows/translation_modules.yml b/.github/workflows/translation_modules.yml new file mode 100644 index 000000000..013d58042 --- /dev/null +++ b/.github/workflows/translation_modules.yml @@ -0,0 +1,37 @@ +name: Translation of Modules + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + sync: + name: Sync + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Sync with Crowdin + uses: crowdin/github-action@master + with: + upload_sources: true + upload_translations: true + download_translations: true + skip_untranslated_files: true + + localization_branch_name: 'translations' + commit_message: 'new crowdin translations' + pull_request_title: 'New Crowdin translations' + pull_request_body: 'https://crowdin.com/project/akaunting-apps' + pull_request_labels: 'Translation' + + config: 'crowdin_modules.yml' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_APPS_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/crowdin_modules.yml b/crowdin_modules.yml new file mode 100644 index 000000000..6fee73225 --- /dev/null +++ b/crowdin_modules.yml @@ -0,0 +1,22 @@ +"project_id_env": CROWDIN_PROJECT_ID +"api_token_env": CROWDIN_PERSONAL_TOKEN +"preserve_hierarchy": true + +"files": [ + { + "source": "modules/OfflinePayments/Resources/lang/en-GB/general.php", + "dest": "offline-payments/general.php", + "translation": "modules/OfflinePayments/Resources/lang/%locale%/offline-payments/general.php", + "translation_replace": { + "offline-payments/": "" + } + }, + { + "source": "modules/PaypalStandard/Resources/lang/en-GB/general.php", + "dest": "paypal-standard/general.php", + "translation": "modules/PaypalStandard/Resources/lang/%locale%/paypal-standard/general.php", + "translation_replace": { + "paypal-standard/": "" + } + } +]