Skip to content

Commit 8f88151

Browse files
myelinated-wackerowclaudewackerow
committed
feat: add SDK-based translation generator
Workflow + TS script using @google/genai SDK to generate remaining glossary translations via GH Actions (bypasses CLI rate limits). Retries, logging, summary report. Commits results back to glossary-term-extraction branch. TODO: revert branch-task.yml before merging to dev Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
1 parent 1368c4e commit 8f88151

2 files changed

Lines changed: 624 additions & 2 deletions

File tree

.github/workflows/branch-task.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,56 @@
1+
# TODO: REVERT ALL CHANGES TO THIS FILE PRIOR TO MERGING TO DEV
2+
# This file should be the empty stub from the branch-task PR commented out below
3+
# The job below is temporary for glossary translation generation only.
4+
5+
# name: Branch Task
6+
7+
# on:
8+
# workflow_dispatch:
9+
10+
# jobs:
11+
# stub:
12+
# runs-on: ubuntu-latest
13+
# steps:
14+
# - run: echo "ok"
15+
116
name: Branch Task
217

318
on:
419
workflow_dispatch:
520

621
jobs:
7-
stub:
22+
generate-translations:
823
runs-on: ubuntu-latest
24+
timeout-minutes: 360
925
steps:
10-
- run: echo "ok"
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: glossary-term-extraction
29+
30+
- uses: pnpm/action-setup@v4
31+
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: 22
35+
cache: "pnpm"
36+
37+
- run: pnpm install --frozen-lockfile
38+
39+
- name: Generate glossary translations
40+
env:
41+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
42+
run: npx tsx scripts/generate-translations-sdk.ts
43+
44+
- name: Commit and push results
45+
run: |
46+
git config user.name "github-actions[bot]"
47+
git config user.email "github-actions[bot]@users.noreply.github.com"
48+
git add scripts/translations/
49+
if git diff --staged --quiet; then
50+
echo "No new translations to commit"
51+
else
52+
git commit -m "data: glossary translations via Gemini SDK
53+
54+
Co-Authored-By: Gemini <noreply@google.com>"
55+
git push
56+
fi

0 commit comments

Comments
 (0)