Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

33 righe
1008 B

  1. name: Internationalization check
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v1
  8. - name: Set up Python
  9. uses: actions/setup-python@v1
  10. with:
  11. python-version: 3.8
  12. - name: Install dependencies
  13. run: |
  14. pip install --upgrade pip pipenv
  15. pipenv sync -d
  16. - name: Check i18n
  17. run: |
  18. pipenv run python setup.py extract_messages --output-file=/tmp/kosmorro-messages.pot > /dev/null
  19. n=$(diff -y --suppress-common-lines kosmorrolib/locales/messages.pot /tmp/kosmorro-messages.pot | grep -v -E '^"POT-Creation-Date: ' | wc -l)
  20. if [ "$n" -ne "0" ]; then
  21. echo "❌ The messages file is not up-to-date!"
  22. echo " Please run the following command to fix this:"
  23. echo
  24. echo " pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot"
  25. exit 1
  26. fi
  27. echo "✔ Messages file up-to-date."