Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

5 лет назад
5 лет назад
5 лет назад
5 лет назад
5 лет назад
5 лет назад
5 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Internationalization check
  2. on:
  3. push:
  4. branches: [master, features]
  5. pull_request:
  6. branches: [master, features]
  7. jobs:
  8. internationalization:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Set up Python
  13. uses: actions/setup-python@v2
  14. with:
  15. python-version: '3.x'
  16. - name: Install dependencies
  17. run: |
  18. pip install --upgrade pip pipenv
  19. pipenv sync -d
  20. - name: Check i18n
  21. run: |
  22. pipenv run pybabel extract --output=/tmp/kosmorro-messages.pot _kosmorro
  23. echo
  24. diff=$(diff _kosmorro/locales/messages.pot /tmp/kosmorro-messages.pot | grep '^>')
  25. n=$(echo "$diff" | grep -v '> "POT-Creation-Date: ' | wc -l)
  26. if [ "$(echo "$diff" | grep -E '^"Generated-By: Babel' | wc -l)" -eq "1" ]; then
  27. echo "❌ You dependencies may be out of date!"
  28. echo " Please run the following command to fix this:"
  29. echo
  30. echo " pipenv sync --dev"
  31. echo
  32. echo " Then update the messages file:"
  33. echo
  34. echo " make messages"
  35. exit 2
  36. fi
  37. if [ "$n" -ne "0" ]; then
  38. echo "❌ The messages file is not up-to-date!"
  39. echo " Please run the following command to fix this:"
  40. echo
  41. echo " make messages"
  42. exit 1
  43. fi
  44. echo "✔ Messages file up-to-date."