From 60599ec692c6cf442bccc6fb3a92ff149ee1611f Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Thu, 27 Aug 2026 00:01:04 +0530 Subject: [PATCH] ci: crowdin actions to upload main.pot file (#58461) --- .../crowdin-actions-update-main-pot.yml | 54 +++++++++++++++++++ crowdin.yml | 13 +---- 2 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/crowdin-actions-update-main-pot.yml diff --git a/.github/workflows/crowdin-actions-update-main-pot.yml b/.github/workflows/crowdin-actions-update-main-pot.yml new file mode 100644 index 00000000000..1dde7442205 --- /dev/null +++ b/.github/workflows/crowdin-actions-update-main-pot.yml @@ -0,0 +1,54 @@ +name: Upload main.pot to Crowdin + +on: + push: + branches: + - develop + - version-16-hotfix + paths: + - "erpnext/locale/main.pot" + workflow_dispatch: + +concurrency: + group: crowdin-upload-${{ github.ref_name }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + upload-sources: + name: Upload sources from ${{ github.ref_name }} + runs-on: ubuntu-latest + + steps: + - name: Checkout ${{ github.ref_name }} + uses: actions/checkout@v6 + + - name: Restore Crowdin cache + uses: actions/cache/restore@v6 + with: + path: .crowdin + key: crowdin-${{ github.ref_name }} + restore-keys: crowdin-${{ github.ref_name }}- + + - name: Upload main.pot to Crowdin + uses: crowdin/github-action@8f01d54f70f1713ee3f09d82c2bbb2daeac28689 # v2.17.1 + with: + config: crowdin.yml + upload_sources: true + upload_translations: false + download_translations: false + create_pull_request: false + crowdin_branch_name: "[frappe.erpnext] ${{ github.ref_name }}" + upload_sources_args: "--cache" + env: + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + + - name: Save Crowdin cache + uses: actions/cache/save@v6 + if: always() + with: + path: .crowdin + key: crowdin-${{ github.ref_name }}-${{ github.run_id }} diff --git a/crowdin.yml b/crowdin.yml index 3782fb6dd32..c8e71c6d142 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,14 +1,5 @@ +preserve_hierarchy: true + files: - source: /erpnext/locale/main.pot translation: /erpnext/locale/%two_letters_code%.po -pull_request_title: "fix: sync translations from crowdin" -pull_request_labels: - - translation - - skip-release-notes -pull_request_reviewers: - - barredterra # change to your GitHub username if you copied this file -commit_message: "fix: %language% translations" -append_commit_message: false -languages_mapping: - two_letters_code: - pt-BR: pt_BR