chore: remove unused i18n-check workflow and comment out schedule in autobuild

This commit is contained in:
Tunglies
2025-06-02 13:59:42 +08:00
Unverified
parent 0536a45959
commit 06130b95d2
2 changed files with 3 additions and 61 deletions

View File

@@ -2,9 +2,9 @@ name: Auto Build
on:
workflow_dispatch:
schedule:
# UTC+8 0,6,12,18
# - cron: "0 16,22,4,10 * * *"
# schedule:
# UTC+8 0,6,12,18
# - cron: "0 16,22,4,10 * * *"
permissions: write-all
env:
CARGO_INCREMENTAL: 0

View File

@@ -1,58 +0,0 @@
name: Check Missing i18n Keys
on:
push:
paths:
- "src/locales/en.json"
- "src/locales/*.json"
- ".github/workflows/i18n-check.yml"
workflow_dispatch:
jobs:
check-i18n:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install jq
run: sudo apt-get install -y jq
- name: Check missing i18n keys
id: check-missing
run: |
mkdir -p i18n-missing
EN_KEYS=$(jq -r 'keys[]' src/locales/en.json | sort)
for file in src/locales/*.json; do
[ "$file" = "src/locales/en.json" ] && continue
LANG=$(basename "$file" .json)
jq -r 'keys[]' "$file" | sort > tmp_keys.txt
comm -23 <(echo "$EN_KEYS") tmp_keys.txt > i18n-missing/$LANG.txt || true
if [ -s i18n-missing/$LANG.txt ]; then
echo "Missing keys in $LANG:"
cat i18n-missing/$LANG.txt
fi
done
- name: Create PR if missing keys found
uses: peter-evans/create-pull-request@v6
if: |
always() && (hashFiles('i18n-missing/*.txt') != '')
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(i18n): report missing translation keys"
title: "chore(i18n): report missing translation keys"
body: |
The following language files are missing keys compared to en.json:
${{ steps.check-missing.outputs.summary }}
Each file in `i18n-missing/` lists the missing keys for that language.
branch: i18n/missing-keys-report
add-paths: |
i18n-missing/*.txt