-
Notifications
You must be signed in to change notification settings - Fork 8
75 lines (60 loc) · 1.91 KB
/
auto-i18n-translation.yml
File metadata and controls
75 lines (60 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Auto I18n Translation
on:
push:
branches: [main]
paths:
- "messages/en-US.json"
permissions:
contents: write
pull-requests: write
jobs:
translate:
name: Auto Translation
runs-on: ubuntu-latest
if: ${{ github.repository == 'ifLabX/AgentifUI' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Clean extra keys and run full translation
run: |
echo "🧹 Cleaning extra keys..."
pnpm i18n:remove-extra || true
echo "🤖 Starting translation..."
pnpm i18n:translate
echo "✅ Validating translations..."
pnpm i18n:check || true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT }}
branch: auto-i18n-updates
delete-branch: true
title: "chore(i18n): auto-update translations"
body: |
## 🤖 Automated Translation Update
Auto-generated translations based on changes to `messages/en-US.json`.
**Triggered by**: Push to main branch
**Languages**: All supported languages
**Mode**: Full translation update
Please review the translations and merge when ready.
labels: |
i18n
automated
commit-message: |
chore(i18n): auto-update translations
Auto-generated by GitHub Actions