Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/.i18n-trigger
Original file line number Diff line number Diff line change
@@ -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)
22 changes: 14 additions & 8 deletions .github/workflows/i18n-update-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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