[web] i18n: remove sync script since we also need to translate

This commit is contained in:
Yangshun 2025-04-24 11:27:41 +08:00
parent 42d4f58f70
commit 4a8619c308
1 changed files with 0 additions and 45 deletions

View File

@ -1,45 +0,0 @@
name: Sync i18n strings
on:
pull_request:
push:
branches:
- main
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
sync-i18n-strings:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.15.8
- name: Install dependencies
run: pnpm install
- name: Rename original en-US.json file
run: mv apps/web/src/locales/raw/en-US.json apps/web/src/locales/raw/en-US.json.original
working-directory: ${{ github.workspace }}
- name: Extract i18n messages
run: pnpm i18n:extract
working-directory: apps/web
- name: 'Update i18n messages if required'
run: |
if ! diff -u apps/web/src/locales/raw/en-US.json apps/web/src/locales/raw/en-US.json.original; then
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"
rm apps/web/src/locales/raw/en-US.json.original
git add apps/web/src/raw/locales/en-US.json
git commit -m "i18n: update en-US.json file"
git push
echo "Note: en-US.json file updated and committed."
else
echo "Success: en-US.json file is up to date."
fi
working-directory: ${{ github.workspace }}