From 02f8ce22a5382f93a5b6e95b7dad174e816a2cbf Mon Sep 17 00:00:00 2001 From: snomiao Date: Mon, 10 Nov 2025 09:29:25 +0000 Subject: [PATCH 1/3] trigger: Fix missing subscription.* translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit triggers the i18n workflow to generate missing translations for subscription.* keys that were added after the last locale update. The subscription.titleUnsubscribed key was added in f2aea9c82 on Nov 1, but the last locale update was on Oct 30 (a189e519f). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/.i18n-trigger | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/.i18n-trigger diff --git a/.github/.i18n-trigger b/.github/.i18n-trigger new file mode 100644 index 0000000000..e28684cf8c --- /dev/null +++ b/.github/.i18n-trigger @@ -0,0 +1,10 @@ +# 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. From 1415b5591fab3f3a77631338f4a8b27aac4fb12b Mon Sep 17 00:00:00 2001 From: snomiao Date: Mon, 10 Nov 2025 10:00:20 +0000 Subject: [PATCH 2/3] fix: Correct i18n workflow git commit logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous workflow was resetting the branch which discarded the generated locale changes. This fix simplifies the commit logic to just add and commit the changes directly without branch manipulation. The issue was: - git stash + git checkout -B would reset to remote, losing changes - The detached HEAD in GitHub Actions made stash operations unreliable The fix: - Remove unnecessary git stash/checkout operations - Directly add, commit, and push the locale changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/.i18n-trigger | 4 +++- .github/workflows/i18n-update-core.yaml | 14 ++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/.i18n-trigger b/.github/.i18n-trigger index e28684cf8c..bcee27611a 100644 --- a/.github/.i18n-trigger +++ b/.github/.i18n-trigger @@ -1,6 +1,6 @@ # 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 @@ -8,3 +8,5 @@ # # 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..a467634b7f 100644 --- a/.github/workflows/i18n-update-core.yaml +++ b/.github/workflows/i18n-update-core.yaml @@ -48,12 +48,10 @@ jobs: 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 From 5d8f5669837138c3b52df40e37ece96e7f095d40 Mon Sep 17 00:00:00 2001 From: snomiao Date: Mon, 10 Nov 2025 10:36:33 +0000 Subject: [PATCH 3/3] debug: Add locale state debugging to i18n workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add debug step to check: - If subscription section exists in source (en) locale - If subscription section exists in target (zh) locale - Git working tree status before commit This will help diagnose why lobe-i18n isn't generating changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/i18n-update-core.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/i18n-update-core.yaml b/.github/workflows/i18n-update-core.yaml index a467634b7f..aa49a2302b 100644 --- a/.github/workflows/i18n-update-core.yaml +++ b/.github/workflows/i18n-update-core.yaml @@ -44,6 +44,14 @@ 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'