Skip to content

Crowdin

Crowdin #58

# All credits goes to Cog-Creators for this crowdin setup
# https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/.github/workflows/publish_crowdin.yml
name: Crowdin
on:
schedule:
- cron: "0 0 1 * *"
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
jobs:
deploy:
if: github.repository == 'retke/Laggrons-Dumb-Cogs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install dependencies
run: |
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
pip install redgettext==3.3
- name: Generate source files
run: |
make gettext
- name: Upload source files
run: |
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.
branch: "automated/i18n"