check-i18n.yml 942 B

12345678910111213141516171819202122232425262728293031323334353637
  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-latest
  14. steps:
  15. - uses: actions/checkout@v3
  16. - name: Install system dependencies
  17. run: |
  18. sudo apt-get update
  19. sudo apt-get install -y libicu-dev libidn11-dev
  20. - name: Set up Ruby
  21. uses: ruby/setup-ruby@v1
  22. with:
  23. ruby-version: .ruby-version
  24. bundler-cache: true
  25. - name: Check locale file normalization
  26. run: bundle exec i18n-tasks check-normalized
  27. - name: Check for unused strings
  28. run: bundle exec i18n-tasks unused -l en
  29. - name: Check for wrong string interpolations
  30. run: bundle exec i18n-tasks check-consistent-interpolations
  31. - name: Check that all required locale files exist
  32. run: bundle exec rake repo:check_locales_files