mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
First attempt automated crowdin (#3521)
This commit is contained in:
parent
17b8ef09c6
commit
c6bc4c1bd6
34
.github/workflows/publish_crowdin.yml
vendored
34
.github/workflows/publish_crowdin.yml
vendored
@ -1,8 +1,13 @@
|
|||||||
name: Publish to Crowdin
|
name: Publish to Crowdin
|
||||||
on:
|
on:
|
||||||
push:
|
schedule:
|
||||||
tags:
|
- cron: '0 12 * * THU'
|
||||||
- "*"
|
repository_dispatch:
|
||||||
|
types: crowdin
|
||||||
|
|
||||||
|
env:
|
||||||
|
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -20,9 +25,24 @@ jobs:
|
|||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -y crowdin
|
sudo apt-get install -y crowdin
|
||||||
pip install redgettext==3.1
|
pip install redgettext==3.1
|
||||||
- name: Publish
|
- name: Generate source files
|
||||||
env:
|
run: |
|
||||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
make gettext
|
||||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
- name: Upload source files
|
||||||
run: |
|
run: |
|
||||||
make upload_translations
|
make upload_translations
|
||||||
|
- name: Download translations
|
||||||
|
run: |
|
||||||
|
make download_translations
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
commit-message: Automated Crowdin downstream
|
||||||
|
title: "[i18n] Automated Crowdin downstream"
|
||||||
|
body: |
|
||||||
|
This is an automated PR.
|
||||||
|
Please ensure that there are no errors or invalid files are in the PR.
|
||||||
|
labels: "Automated PR, Category: i18n"
|
||||||
|
branch: "automated/i18n"
|
||||||
|
|
||||||
|
|||||||
1
Makefile
1
Makefile
@ -10,7 +10,6 @@ stylecheck:
|
|||||||
gettext:
|
gettext:
|
||||||
$(PYTHON) -m redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"
|
$(PYTHON) -m redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"
|
||||||
upload_translations:
|
upload_translations:
|
||||||
$(MAKE) gettext
|
|
||||||
crowdin upload sources
|
crowdin upload sources
|
||||||
download_translations:
|
download_translations:
|
||||||
crowdin download
|
crowdin download
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user