name: Propose Translation
on:
workflow_dispatch:
inputs:
language:
type: choice
description: Language to translate
options:
- de-de
- ca-es
- es-es
- cs-cz
- fr-fr
- it-it
- da-dk
- nl-nl
- hu-hu
- pl-pl
- pt-pt
- ru-ru
- sv-fi
- sv-se
- tr-tr
jobs:
Propose_translation:
env:
TARGET_LANG: ${{ inputs.language }}
API_KEY: ${{ secrets.DL_API_KEY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Translate Tools
run: |
python -m pip install ovos-translate-plugin-deepl ovos-utils
- name: Run Translate Script
run: python scripts/translate.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: autotranslate
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: Proposed ${{ inputs.language }} Translations
body: Translations for review
labels: translation
branch: staging/translation_${{ inputs.language }}
reviewers: emphasize