update electron translations (#1031)

pull/728/head
Kaalleen 2021-03-05 17:19:25 +01:00 zatwierdzone przez GitHub
rodzic 723c03e5a9
commit fc766b5336
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -4,7 +4,7 @@ on:
- cron: '0 0 * * *'
jobs:
crowdin:
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
@ -16,7 +16,7 @@ jobs:
git submodule update --init --recursive
- uses: actions/setup-python@v1
with:
python-version: '2.7.x'
python-version: '3.x'
- env:
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
run: |
@ -41,7 +41,8 @@ jobs:
# files when a new translation string is added but we don't need to
# commit those until folks actually translate the new strings.
if git diff translations | grep -qE '^[-+]msgstr ".+"$'; then
git add translations
make electron/src/renderer/assets/translations.json
git add translations electron/src/renderer/assets/translations.json
git commit -m "new translations from Crowdin"
git push https://github.com/inkstitch/inkstitch main
fi

Wyświetl plik

@ -23,8 +23,8 @@ messages.po:
find electron/src -name '*.html' -o -name '*.js' -o -name '*.vue' | xargs electron/node_modules/.bin/gettext-extract --quiet --attribute v-translate --output messages-vue.po
msgcat -o messages.po messages-babel.po messages-vue.po
electron/src/renderer/assets/translations.json: $(addsuffix /LC_MESSAGES/inkstitch.po,$(wildcard locales/*))
find locales -name '*.po' -a ! -empty | \
electron/src/renderer/assets/translations.json: $(wildcard translations/messages_*.po)
find translations -name '*.po' -a ! -empty | \
xargs electron/node_modules/.bin/gettext-compile --output electron/src/renderer/assets/translations.json
%.po: %.mo