style: Cleanup translation files #54
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
| on: | |
| push: | |
| branches: | |
| - "cross-version" | |
| jobs: | |
| auto-fix: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Fix language file names | |
| run: | | |
| for lang in src/main/resources/assets/*/lang/*.json | |
| do | |
| rename=$(echo "$lang" | sed -e 's/\b\w\+\.json$/\L\0/' -e 's/\b\([a-z]\+\)\.json$/\/\1_\1.json/') | |
| mv "$lang" "$rename" || true | |
| done | |
| - name: Commit | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: 'src/main/resources/assets' | |
| default_author: github_actions | |
| message: 'fix: Fix language file names' | |
| push: false | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 24 | |
| - name: Set execution rights | |
| run: chmod +x ./gradlew | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Update license headers | |
| run: ./gradlew applyLicenses | |
| - name: Commit | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: 'src/main/java' | |
| default_author: github_actions | |
| message: 'chore: Update license headers' |