diff --git a/.github/.i18n-trigger b/.github/.i18n-trigger new file mode 100644 index 0000000000..bcee27611a --- /dev/null +++ b/.github/.i18n-trigger @@ -0,0 +1,12 @@ +# This file is used to trigger the i18n workflow +# See .github/workflows/i18n-update-core.yaml +# +# The workflow will automatically: +# 1. Collect i18n strings from the UI +# 2. Generate translations using OpenAI +# 3. Commit updated locale files +# +# This trigger was created to fix missing subscription.* translations +# that were added after the last automatic locale update. +# +# Re-triggering after fixing git commit workflow issue (2025-11-10) diff --git a/.github/workflows/i18n-update-core.yaml b/.github/workflows/i18n-update-core.yaml index 8a20af4c0e..aa49a2302b 100644 --- a/.github/workflows/i18n-update-core.yaml +++ b/.github/workflows/i18n-update-core.yaml @@ -44,16 +44,22 @@ jobs: run: pnpm locale env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + - name: Debug locale state + run: | + echo "=== Checking if subscription exists in source (en) ===" + jq '.subscription | keys' src/locales/en/main.json || echo "No subscription section in en" + echo "=== Checking if subscription exists in target (zh) ===" + jq '.subscription | keys' src/locales/zh/main.json || echo "No subscription section in zh" + echo "=== Git working tree status ===" + git status --porcelain src/locales/ - name: Commit updated locales run: | git config --global user.name 'github-actions' git config --global user.email 'github-actions@github.com' - git fetch origin ${{ github.head_ref }} - # Stash any local changes before checkout - git stash -u - git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }} - # Apply the stashed changes if any - git stash pop || true git add src/locales/ - git diff --staged --quiet || git commit -m "Update locales" - git push origin HEAD:${{ github.head_ref }} + if ! git diff --staged --quiet; then + git commit -m "Update locales" + git push origin HEAD:${{ github.head_ref }} + else + echo "No locale changes to commit" + fi