Update cat.po #278
Workflow file for this run
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: Mistake Checker | |
| on: | |
| pull_request_target: | |
| branches: [master] | |
| paths: | |
| - "translations/**" | |
| jobs: | |
| getfiles: | |
| name: Check changed files for mistakes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Check changed files for mistakes | |
| id: mistakes | |
| shell: bash | |
| run: | | |
| echo $(python ${{ github.workspace }}/.github/workflows/mistake_check.py ${{ github.event.pull_request.number }}) > mistakes.txt | |
| echo ${{ github.event.pull_request.number }} > number.txt | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mistakes | |
| path: | | |
| mistakes.txt | |
| number.txt | |
| - name: Output detected mistakes if any | |
| uses: actions/github-script@v6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| let fs = require('fs'); | |
| const mistakes = JSON.parse(fs.readFileSync('./mistakes.txt').toString()); | |
| let mistakeConditions = mistakes.map(mistake => mistake.condition).join(""); | |
| const invalidTranslation = /invalid_format|invalid_colors_and_format|modified_msgid/gm; | |
| if (mistakes.length !== 0) | |
| if (invalidTranslation.test(mistakeConditions)) | |
| core.setFailed("Mistakes found! Check comment for more details"); |