mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 01:14:46 +00:00
Co-authored-by: Diptanil Saha <diptanil@frappe.io> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> fix (#55348)
63 lines
2.2 KiB
YAML
63 lines
2.2 KiB
YAML
# Syncs Crowdin translations from develop into version-16-hotfix,
|
|
# filtered to only the strings present in hotfix's main.pot.
|
|
#
|
|
# Trigger: fires when version-16-hotfix's main.pot is updated — i.e., when
|
|
# the POT update PR from generate-pot-file.yml is merged. At that point
|
|
# hotfix's main.pot is authoritative, and this workflow fetches develop's
|
|
# latest .po files (Crowdin translations) and merges them against it.
|
|
#
|
|
# The weekly schedule acts as a safety net to pick up any Crowdin translations
|
|
# that arrived on develop between POT update cycles.
|
|
#
|
|
# POT file generation remains in generate-pot-file.yml (unchanged).
|
|
# Maintain this file on develop only; it always acts on version-16-hotfix.
|
|
|
|
name: Sync translations to version-16-hotfix
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- version-16-hotfix
|
|
paths:
|
|
- "erpnext/locale/main.pot" # fires exactly when the POT update PR merges
|
|
schedule:
|
|
# 10:00 UTC Monday — safety net for Crowdin translations that arrived
|
|
# on develop since the last POT update PR merged to version-16-hotfix
|
|
- cron: "0 10 * * 1"
|
|
workflow_dispatch:
|
|
|
|
# Prevent concurrent runs. cancel-in-progress: false because a mid-flight
|
|
# `git push` + `gh pr create` cancellation can leave an orphaned remote branch.
|
|
concurrency:
|
|
group: sync-hotfix-translations
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
sync-translations:
|
|
name: Sync translations to version-16-hotfix
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout version-16-hotfix
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: version-16-hotfix
|
|
# Full history so `git fetch origin develop` inside the helper works
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
# Match generate-pot-file.yml — bench runs under the same frappe
|
|
# stack and must use the same Python version.
|
|
python-version: "3.14"
|
|
|
|
- name: Run sync script
|
|
run: |
|
|
bash ${GITHUB_WORKSPACE}/.github/helper/sync_hotfix_translations.sh
|
|
env:
|
|
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
PR_REVIEWER: barredterra # change to your GitHub username if you copied this file
|