mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
chore: remove unused i18n-check workflow and comment out schedule in autobuild
This commit is contained in:
6
.github/workflows/autobuild.yml
vendored
6
.github/workflows/autobuild.yml
vendored
@@ -2,9 +2,9 @@ name: Auto Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
# schedule:
|
||||||
# UTC+8 0,6,12,18
|
# UTC+8 0,6,12,18
|
||||||
# - cron: "0 16,22,4,10 * * *"
|
# - cron: "0 16,22,4,10 * * *"
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
|||||||
58
.github/workflows/i18n-check.yaml
vendored
58
.github/workflows/i18n-check.yaml
vendored
@@ -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
|
|
||||||
Reference in New Issue
Block a user