check-i18n.yml 1.1 KB

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