Skip to content

Commit

Permalink
chore(www): remove "missing translations" action (#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens authored Mar 11, 2024
1 parent 14e0a07 commit 72f5782
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/pull_request_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,47 +82,3 @@ jobs:
run: |
echo "This PR has the 'need test' label. Please remove it before merging."
exit 1
translations:
name: '[WIP] Missing Translations Label'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- name: Check resources/original_messages.json
id: changed-original-messages
uses: tj-actions/changed-files@v35
with:
files: resources/original_messages.json

- name: Collect src/www/messages Changes
if: steps.changed-original-messages.outputs.any_changed == 'true'
id: changed-translated-messages
uses: tj-actions/changed-files@v35
with:
files: src/www/messages/*.json

- name: Check src/www/messages Changes
if: steps.changed-original-messages.outputs.any_changed == 'true'
id: not-every-translation-changed
run: |
TRANSLATIONS_COUNT="$(ls src/www/messages | wc -l | xargs)"
IFS=' ' read -r -a TRANSLATED_MESSAGES <<< "${{ steps.changed-translated-messages.outputs.all_changed_files }}"
TRANSLATED_MESSAGES_COUNT="${#TRANSLATED_MESSAGES[@]}"
if [ "${TRANSLATED_MESSAGES_COUNT}" != "${TRANSLATIONS_COUNT}" ]; then
echo "Translations are not atomic. Please update all translations in a single commit."
echo "Changed translations: ${TRANSLATED_MESSAGES_COUNT}"
echo "Expected translations: ${TRANSLATIONS_COUNT}"
echo "result=true" >> "${GITHUB_OUTPUT}"
fi
- name: Apply 'Missing Translations' Label
if: steps.not-every-translation-changed.outputs.result == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: missing translations

0 comments on commit 72f5782

Please sign in to comment.