1
0

check-i18n.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: Check i18n
  2. on:
  3. push:
  4. branches:
  5. - 'main'
  6. - 'stable-*'
  7. pull_request:
  8. branches:
  9. - 'main'
  10. - 'stable-*'
  11. env:
  12. RAILS_ENV: test
  13. permissions:
  14. contents: read
  15. jobs:
  16. check-i18n:
  17. runs-on: ubuntu-24.04
  18. steps:
  19. - uses: actions/checkout@v4
  20. - name: Set up Ruby environment
  21. uses: ./.github/actions/setup-ruby
  22. - name: Set up Javascript environment
  23. uses: ./.github/actions/setup-javascript
  24. - name: Check for missing strings in English JSON
  25. run: |
  26. yarn i18n:extract --throws
  27. git diff --exit-code
  28. - name: Check locale file normalization
  29. run: bundle exec i18n-tasks check-normalized
  30. - name: Check for unused strings
  31. run: bundle exec i18n-tasks unused
  32. - name: Check for missing strings in English YML
  33. run: |
  34. bundle exec i18n-tasks add-missing -l en
  35. git diff --exit-code
  36. - name: Check for wrong string interpolations
  37. run: bundle exec i18n-tasks check-consistent-interpolations
  38. - name: Check that all required locale files exist
  39. run: bundle exec rake repo:check_locales_files