浏览代码

chore(i18n): fix messages scripts

tags/v0.10.9
Jérôme Deuchnord 2 年前
committed by Jérôme Deuchnord
父节点
当前提交
5d3d2a0d47
共有 4 个文件被更改,包括 17 次插入16 次删除
  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 查看文件

@@ -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)



+ 5
- 6
.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/*


+ 2
- 2
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


+ 4
- 4
_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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"


正在加载...
取消
保存