diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 95d77e9..76d042e 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -11,18 +11,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: '3.x' - name: Install dependencies run: | pip install --upgrade pip pipenv pipenv sync -d - name: Check i18n run: | - pipenv run python setup.py extract_messages --output-file=/tmp/kosmorro-messages.pot > /dev/null + pipenv run pybabel extract --output=/tmp/kosmorro-messages.pot _kosmorro + echo + diff=$(diff _kosmorro/locales/messages.pot /tmp/kosmorro-messages.pot | grep '^>') n=$(echo "$diff" | grep -v '> "POT-Creation-Date: ' | wc -l) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91b0459..595936d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,11 +8,11 @@ jobs: name: Build and Release to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: '3.x' - name: Setup environment run: | sudo apt update @@ -20,8 +20,8 @@ jobs: sudo gem install ronn - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install pipenv setuptools wheel twine skyfield numpy tabulate Babel requests + python -m pip install --upgrade pip pipenv setuptools wheel twine + pipenv install - name: Build package run: | make i18n build @@ -31,4 +31,3 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | twine upload dist/* - diff --git a/Makefile b/Makefile index c64a83e..45dce8e 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,10 @@ manpage: ronn --roff manpage/kosmorro.7.md messages: - pipenv run python setup.py extract_messages --output-file=_kosmorro/locales/messages.pot + pipenv run pybabel extract --output=_kosmorro/locales/messages.pot _kosmorro i18n: - pipenv run python setup.py compile_catalog + pipenv run pybabel compile --directory=_kosmorro/locales changelog: conventional-changelog -p angular -i CHANGELOG.md -s diff --git a/_kosmorro/locales/messages.pot b/_kosmorro/locales/messages.pot index db42da8..3922fe5 100644 --- a/_kosmorro/locales/messages.pot +++ b/_kosmorro/locales/messages.pot @@ -1,14 +1,14 @@ -# Translations template for kosmorro. +# Translations template for PROJECT. # Copyright (C) 2022 ORGANIZATION -# This file is distributed under the same license as the kosmorro project. +# This file is distributed under the same license as the PROJECT project. # FIRST AUTHOR , 2022. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: kosmorro 0.10.9\n" +"Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2022-01-12 08:53+0100\n" +"POT-Creation-Date: 2022-01-12 13:59+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"