Skip to content

Fix indentantion in ai_law_sets.dm (#627) #18

Fix indentantion in ai_law_sets.dm (#627)

Fix indentantion in ai_law_sets.dm (#627) #18

name: Add new translation
on:
workflow_dispatch:
push:
branches: ['translate']
concurrency:
group: translation
cancel-in-progress: false
jobs:
add_translation:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: 'Add new translation'
steps:
- name: 'Update Branch'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Installing Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Installing deps
run: |
python -m pip install --upgrade pip
pip install -r ./tools/translator/requirements.txt
- name: Create temporary branch
run: |
git checkout -b translate_tmp $(git log -n 1 --pretty=format:%H origin/translate -- tools/translator/ss220replace.json)
- name: Apply PR translation
run: |
git diff ..$(git log -n 1 --pretty=format:%H origin/translate) | git apply
- name: 'Generate Translation'
run: |
python ./tools/translator/converter.py
git add ./tools/translator/ss220replace.json
git checkout -- .
- name: 'Push Translation'
run: |
git checkout translate
git config --local user.email "[email protected]"
git config --local user.name "SS220Manager"
git commit -m "Generate translation file"
git push origin translate:translate