feat: add translation workflow and remove old translation.json

This commit is contained in:
LukeGus
2025-12-24 14:03:06 -06:00
parent 053017a502
commit 23ab158d01
8 changed files with 28 additions and 3220 deletions

28
.github/workflows/translate.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Auto Translate
on:
workflow_dispatch:
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Translate with i18n-ai-translate
uses: taahamahdi/i18n-ai-translate@master
with:
json-file-path: src/locales/en/translation.json
api-key: ${{ secrets.GEMINI_API_KEY }}
engine: gemini
output-languages: de fr it ko pt-br ru zh
- name: Commit and push translations
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add src/locales/
git diff --staged --quiet || git commit -m "chore: auto-translate to multiple languages [skip ci]"
git push