Browse Source

chore(i18n): fix messages scripts

tags/v0.10.9
Jérôme Deuchnord 2 years ago
committed by Jérôme Deuchnord
parent
commit
5d3d2a0d47
4 changed files with 17 additions and 16 deletions
  1. +6
    -4
      .github/workflows/i18n.yml
  2. +5
    -6
      .github/workflows/release.yml
  3. +2
    -2
      Makefile
  4. +4
    -4
      _kosmorro/locales/messages.pot

+ 6
- 4
.github/workflows/i18n.yml View File

@@ -11,18 +11,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest


steps: steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with: with:
python-version: 3.8
python-version: '3.x'
- name: Install dependencies - name: Install dependencies
run: | run: |
pip install --upgrade pip pipenv pip install --upgrade pip pipenv
pipenv sync -d pipenv sync -d
- name: Check i18n - name: Check i18n
run: | 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 '^>') diff=$(diff _kosmorro/locales/messages.pot /tmp/kosmorro-messages.pot | grep '^>')
n=$(echo "$diff" | grep -v '> "POT-Creation-Date: ' | wc -l) n=$(echo "$diff" | grep -v '> "POT-Creation-Date: ' | wc -l)




+ 5
- 6
.github/workflows/release.yml View File

@@ -8,11 +8,11 @@ jobs:
name: Build and Release to PyPI name: Build and Release to PyPI
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with: with:
python-version: '3.7'
python-version: '3.x'
- name: Setup environment - name: Setup environment
run: | run: |
sudo apt update sudo apt update
@@ -20,8 +20,8 @@ jobs:
sudo gem install ronn sudo gem install ronn
- name: Install dependencies - name: Install dependencies
run: | 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 - name: Build package
run: | run: |
make i18n build make i18n build
@@ -31,4 +31,3 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: | run: |
twine upload dist/* twine upload dist/*


+ 2
- 2
Makefile View File

@@ -11,10 +11,10 @@ manpage:
ronn --roff manpage/kosmorro.7.md ronn --roff manpage/kosmorro.7.md


messages: 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: i18n:
pipenv run python setup.py compile_catalog
pipenv run pybabel compile --directory=_kosmorro/locales


changelog: changelog:
conventional-changelog -p angular -i CHANGELOG.md -s conventional-changelog -p angular -i CHANGELOG.md -s


+ 4
- 4
_kosmorro/locales/messages.pot View File

@@ -1,14 +1,14 @@
# Translations template for kosmorro.
# Translations template for PROJECT.
# Copyright (C) 2022 ORGANIZATION # 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 <EMAIL@ADDRESS>, 2022. # FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kosmorro 0.10.9\n"
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"


Loading…
Cancel
Save