Translation Key Check (zh-TW) #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Translation Key Check (zh-TW) | |
| on: | |
| schedule: | |
| # Run once per day at 00:00 UTC | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| check-translation-keys: | |
| name: Compare zh-TW keys with en.json | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Run translation key comparison | |
| run: | | |
| node ./scripts/compare-translation-keys.mjs | |
| - name: Upload markdown report artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: translation-report | |
| path: .github/translation-report.md | |
| - name: Commit updated report and cache | |
| if: always() | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .github/translation-report.md .github/translation-version.json | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "chore: update translation key report" | |
| git push |